Commit Graph

23 Commits

Author SHA1 Message Date
marius-kilocode ae26eed9b1 fix(vscode): shorten prompt model label 2026-08-17 14:55:44 +02:00
chrarnoldus 4ff8f5e110 feat(vscode): show Auto model routes for every kilo-auto model
Show the underlying model list in the selector whenever an Auto model
includes autoRouting, not only kilo-auto/efficient.

Co-authored-by: kiloconnect[bot] <240665456+kiloconnect[bot]@users.noreply.github.com>
2026-08-09 15:44:33 +00:00
marius-kilocode 28ca0733bb feat(vscode): improve model search ranking 2026-08-06 13:32:45 +02:00
Johnny Eric Amancio 9394887e13 feat(vscode): improve auto model picker details (#11724)
* feat(vscode): improve auto model picker details

* fix(vscode): address auto picker review feedback
2026-06-26 20:17:21 +02:00
chrarnoldus ccec216238 feat: show BYOK availability in model pickers
Co-authored-by: kiloconnect[bot] <240665456+kiloconnect[bot]@users.noreply.github.com>
2026-06-18 12:42:54 +00:00
chrarnoldus 9c279a16b4 fix: respect model badge metadata
Co-authored-by: kiloconnect[bot] <240665456+kiloconnect[bot]@users.noreply.github.com>
2026-06-10 15:09:51 +00:00
Josh Lambert e356f068d4 fix: clarify free model training disclosure 2026-06-03 11:10:13 -04:00
Igor Šćekić 8aaa62c794 Session export capture (#10611)
* feat(session-export): scaffold module with config constants

* feat(session-export): add zstd compression wrapper

* feat(session-export): event and envelope type definitions

* feat(session-export): eligibility check with kill-switch

* feat(session-export): org signal collector with auth resolver

* feat(session-export): worker SQLite schema and storage helpers

* feat(session-export): content-addressed chunker with zstd dedup

* feat(session-export): client-side light scrubber

* feat(session-export): IPC contract and inbox with back-pressure

* feat(session-export): persist scrubbed events with chunked payloads

* feat(session-export): worker entry point with inbox drain loop

* feat(session-export): main-thread capture module

* feat(session-export): workspace baseline and delta fibers

* feat(session-export): sync subscriber and tool io chunking

* feat(session-export): bootstrap wiring and compaction hook

* feat(session-export): wire capture hooks into sessions

* feat(session-export): uploader and buffer cap

* chore(session-export): annotate shared session hooks

* changeset(session-export): add release note

* fix(session-export): keep bootstrap non-blocking without instance context

* feat(session-export): respawn worker after failures

* test(session-export): add performance budget assertions

* test(session-export): add worker end-to-end smoke test

* fix(session-export): strip identity and high-risk baseline paths

* test(session-export): gate perf assertions for stable sweeps

* fix(session-export): bundle worker in single-file builds

* fix(session-export): make capture envelopes cloneable

* fix(session-export): drain worker on CLI shutdown

* feat(session-export): capture workspace baseline and deltas

* fix(session-export): preserve request metadata

* test(session-export): cover request metadata capture

* feat(cli): send indexed session export batches

* feat(cli): authorize session export uploads

* fix(cli): flush session export shutdown uploads

* feat(cli): optimize session export replay payloads

* fix(cli): include session export surface metadata

* fix(session-export): decrement chunk refs after upload

decRefChunks was never called, so chunk ref_count stayed at 1 (or
higher with dedup) and DELETE FROM chunk WHERE ref_count <= 0 never
matched. Chunks accumulated in the local SQLite buffer until the 50 GB
cap. Call decRefChunks alongside markUploaded so deleteUploaded can
reclaim the rows.

* fix(session-export): add periodic uploader flush timer

flushIntervalMs and retryBackoffMaxMs were both defined in config and
neither was referenced anywhere; scheduleFlush only ran on inbound
events or reconnect. After a 5xx or network failure the row was backed
off for 1 s, but if no further event arrived the retry never fired and
the events stranded until the CLI restarted. Drive a periodic flush
from a setInterval, unref the handle so it doesn't pin the process, and
clear it from a new dispose() hook the worker calls on shutdown.

* fix(session-export): stop emitting absolute workspace root in baseline

CaptureMetadata.root was the literal absolute filesystem path
(/Users/<name>/Projects/<repo>), shipped in every
workspace_baseline_completed event and not stripped by handlers'
identity filter. The field was set but never read anywhere downstream
— file paths in the baseline are already relative, so the root added
no replay signal. Remove the field outright.

* fix(session-export): cap pendingEvents result set

The SELECT had no LIMIT clause, so under a backlog (network outage,
crashed receiver) it would materialize the full pending table into a
JavaScript array before the byte-limit truncation applied. With a
50 GB buffer cap that is hundreds of MB of heap inside the worker per
drain. Add LIMIT 500 — the drain loop already re-queries until empty,
so no events are missed.

* fix(session-export): exponential retry backoff up to retryBackoffMaxMs

Both the 5xx and network-error branches always retried after the floor
delay regardless of how many attempts had already failed, and
retryBackoffMaxMs was unreferenced. During a sustained outage every
session re-tried at roughly 1 Hz against the dead receiver. Surface
upload_attempts on EventRow and compute the next delay as
min * 2^attempts capped at max.

* fix(session-export): evict superseded workspace snapshots on remember

createWorkspaceProvider retained every captured snapshot — in-memory
and inside the persisted state file — even after the session moved on
to a newer one. For a 1k-file repo over a 100-turn session that is
~2 GB of unreachable heap plus a state file that grows monotonically.
Drop the previous snapshot for the session on remember() when no other
session still references it.

* fix(session-export): anchor aws_secret_key scrubber to key name

The bare 40-char base64 pattern matched every 40-character hex string,
including all git commit SHAs. Tool outputs, diffs, and conversation
messages were silently rewritten as <<REDACTED:aws_secret_key>>,
destroying lineage information in training data. Require the key name
context — naked secrets in unstructured text are rare and the .env /
.aws/credentials high-risk path strip already covers the common case.

* fix(session-export): preserve root linkage in SyncSubscriber events

SyncSubscriber hardcoded rootSessionId = sessionId on every tool,
permission, and feedback event, so sub-agent sessions lost their root
linkage and a future training pipeline could not reconstruct the
agent topology from these side-channel events. Expose the rootSessionId
mapping from Capture and plumb it through the same pattern as
getTurnId.

* fix(session-export): atomic chunk GC after upload

markUploaded + decRefChunks + deleteUploaded were three separate SQL
statements; a crash between markUploaded and decRefChunks would leave
events flagged uploaded (never retried) and chunks with stale
ref_count (never reclaimed by deleteUploaded). Bundle the three calls
into a single transactional commitUploaded helper so either all three
land or none of them do.

* fix(session-export): wait on transient sqlite locks

* fix(session-export): snapshot current workspace directory

* fix(cli): preserve Kilo model export metadata

* fix(cli): send anon id for session export

* fix(cli): fallback to telemetry anon id

* chore(cli): annotate session export config test

* chore: remove session export docs

* fix(cli): harden session export uploads

* fix(cli): preserve stream lifecycle for session export

* fix(kilo-docs): exclude session export ingest link

* fix(cli): restrict session export workspace sync to git repos

* chore: remove session export changeset

* fix(cli): tighten session export payload types

* fix(cli): type session export model payloads

* fix(cli): simplify session export cleanup

* fix(cli): avoid session export shutdown race

* refactor(cli): use drizzle for session export storage

* fix(cli): finalize session export sqlite statements

* fix(cli): link compaction exports to root sessions

* fix(cli): stop exporting raw stream parts

* fix(cli): prune stale workspace snapshots

* refactor(cli): clarify chunk ref counting

* test(cli): clarify dropped upload assertions

* ci: avoid visual path filter action failure

* fix(cli): preserve in-flight workspace snapshots

* fix(cli): stop uploading baseline start events

* fix(cli): trim redundant export metadata

* fix(cli): trim workspace export bookkeeping

* fix(cli): fold terminal outcome into tool exports

* fix(cli): dedupe request context in export batches

* fix(cli): normalize compaction export payloads

* fix(cli): avoid duplicate tool result exports

* test(cli): align session export expectations

* fix(cli): run secretlint during session export scrubbing

* fix(cli): keep retried export batches contiguous

* fix(cli): include agent info in session exports

* fix(cli): flush pending session exports on serve startup

* fix(cli): drop exports when scrubbing fails

* fix(cli): narrow secretlint value extraction

* fix(cli): limit exported agent info

* test(cli): remove brittle agent export source assertion

* fix(cli): ignore corrupt session export workspace state

* fix(cli): keep session export close best effort

* fix(cli): avoid following session export symlinks

* fix(cli): preserve session export chunk ref counts

* fix(cli): retry transient session export uploads

* fix(cli): validate session export ingest endpoint

* fix(cli): tolerate missing export token details

* fix(cli): fail closed on session export org lookup

* fix(cli): decode session export permission replies

* fix(cli): finalize session export on stream close

* fix(cli): bound session export baseline timeout

* fix(cli): avoid persisting workspace file contents

* fix(cli): bound workspace snapshot capture

* fix(cli): validate session export worker messages

* fix(cli): revoke stale session export eligibility

* fix(cli): scope session export workspaces

* fix(cli): extend session export shutdown flush

* fix(cli): infer free Kilo models for export

* fix(cli): avoid duplicate chunk refs

* fix(cli): throttle session export uploads

* fix(cli): harden session export capture

* feat: disclose free model data collection (#10767)

* feat: disclose free model data collection

* chore(cli): document free model footer sorting

* fix(vscode): add free model data translations

* fix: simplify free model data label

* fix: simplify data collection badges

* fix: remove duplicate model info disclosure

* fix: restore composer data tooltip

* fix: align jetbrains data collection indicator

* fix: align free model data indicators

* fix(vscode): show data collection in model preview

* fix: limit data indicators to kilo gateway

* test(cli): relax prompt cancel timeout

* test(cli): annotate prompt cancel timeout

* test(cli): classify prompt queue runtime test

* fix(cli): defer session export startup
2026-06-02 13:58:42 +00:00
Josh Lambert 5dd59fb544 test(vscode): update DeepSeek provider priority expectation 2026-05-28 12:39:17 -04:00
kiloconnect[bot] 0918bb4216 fix(vscode): preserve 'Free' in model names like 'Kilo Auto Free'
Only strip the parenthesized '(free)' suffix; bare trailing 'Free' is
part of the name and must be kept. A separate Free label is rendered
elsewhere.
2026-04-28 15:19:59 +00:00
Kirill Kalishev 7f348474b7 Merge branch 'main' into kirillk/model-picker 2026-03-20 09:50:38 -04:00
Marius 42bb938c09 feat(vscode): multi-provider selection with connect/disconnect/OAuth flows (#7295)
* tmp

* tmp

* tmp

* tmp

* tmp

* feat(vscode): multi-provider selection with connect/disconnect/OAuth flows

Reimplements the provider management UI in the VS Code extension settings:

- Split Providers tab into Models (model selection) and Providers (connection management)
- Kilo Gateway always shown at top with login state from profile data
- Provider connect dialog with API key and OAuth (code + auto) flows
- Custom provider dialog for OpenAI-compatible providers via base URL
- Provider action request-response pairing via createProviderAction utility
- Coalesced fetchAndSendProviders prevents request floods (single in-flight + one queued)
- SSE event deduplication: server.instance.disposed filtered by workspace directory
- Login guard prevents concurrent device auth flows
- Model selection fallback chain: override > mode config > global config > recents > kilo-auto
- Recent models persisted in extension globalState (last 5, deduplicated)
- Shared validation in src/shared/ (provider-model.ts, custom-provider.ts)
- 16 locale translations for all new UI strings
- Unit tests for custom-provider validation, model selection, provider actions, visibility

* Add tests

* chore: update kilo-vscode visual regression baselines

* fix(vscode): log swallowed auth.remove errors for configured providers

When a configured provider has both a config entry and an auth store
entry, and auth.remove fails transiently, the error was silently
swallowed. Now logs a warning so the failure is visible in debug output.

* fix(vscode): validate recentModels shape and enforce size limit on extension side

Webview messages are an untrusted boundary. persistRecents and
requestRecents now validate array shape (providerID/modelID must be
strings) and enforce RECENT_LIMIT=5 on the extension side, not just
in the webview. Malformed globalState entries are filtered out on read.

* fix(vscode): normalize directory paths in server.instance.disposed filter

Use path.resolve() when comparing the event directory against the
workspace directory. Prevents false mismatches from trailing slashes
or case differences on case-insensitive filesystems.

* fix(vscode): remove duplicate requestRecents case branches (dead code)

Three consecutive case "requestRecents" blocks existed from iterative
refinement. Only the first executes in a switch. Removed the two dead
duplicates, keeping the validated version using validateRecents().

* fix(vscode): don't navigate to profile after login

Login can now be triggered from the settings tab (Kilo Gateway sign-in
button). The forced navigation to the profile view after login left the
user stuck on the profile tab with no way back to settings without
closing and reopening. The profile data push is sufficient — the
settings Kilo row updates reactively via server.profileData().

* fix(vscode): mask API key input in custom provider dialog

Add type="password" to the API key TextField so it renders as dots
instead of plain text.

* refactor(vscode): extract inline styles from ProviderConnectDialog to CSS classes

Move repeated inline styles to chat.css classes:
- .provider-connect-body (text body styling)
- .provider-connect-code-label (confirmation code label)
- .provider-connect-code (monospace code block)
- .provider-connect-status (spinner + status text row)

* fix: revert unrelated opencode/package.json changes

* chore: update kilo-vscode visual regression baselines

* fix(vscode): send rollback configUpdated on failed config save

When global.config.update fails, send configUpdated with the last known
good config so the webview clears its saving flag and reverts optimistic
state. Without this, a failed save leaves saving=true forever, causing
subsequent configLoaded messages to be ignored.

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-03-20 10:20:24 +01:00
kirillk b2c290283d feat(vscode): model picker — expanded mode, preview, pre-active state, splitter, keyboard nav 2026-03-18 20:04:30 -04:00
kirillk f2c77a6ae8 test(vscode): remove isFree fallback tests now handled by backend 2026-03-17 13:39:10 -04:00
kirillk 741a8153e8 fix(vscode): gate isFree on kilo gateway provider with cost fallback 2026-03-17 09:00:14 -04:00
kirillk db996183b5 fix(vscode): update isFree tests to match new isFree/cost-based signature 2026-03-16 16:19:22 -04:00
Christiaan Arnoldus a341ecdb6f kilo-auto is not a provider 2026-03-06 16:18:13 +01:00
kiloconnect[bot] 55a1de8d9e refactor(model): migrate default to kilo-auto/frontier across codebase
migrate default model IDs from kilo/auto to kilo-auto/frontier and related references across the codebase. update defaults in gateway constants, VSCode provider, tests, UI defaults, and e2e seed. align docs and examples to use kilo-auto/frontier and kilo-auto/free. this is a breaking change for existing configurations

BREAKING CHANGE: update default model IDs to kilo-auto/frontier and kilo-auto/free
kilo/auto and kilo/auto-free no longer used as defaults; update all
references accordingly
2026-03-06 15:03:35 +00:00
Mark IJbema 5d9645df92 fix: never strip Kilo: prefix in stripSubProviderPrefix 2026-03-05 15:42:07 +01:00
Mark IJbema 4bc5f63ab5 fix: strip Kilo Gateway sub-provider prefix from model trigger label 2026-03-05 15:40:23 +01:00
Mark IJbema ed25e51209 fix: update model-selector-utils tests for new buildTriggerLabel signature 2026-03-05 15:13:47 +01:00
Catriel Müller cb08438bc3 fix(test): update model-selector-utils test import path after move to shared/ 2026-02-27 08:09:40 -03:00
Igor Šćekić 5808ab0042 test(vscode): extract providerSortKey, isFree, buildTriggerLabel from ModelSelector and add tests 2026-02-20 14:13:54 +01:00