Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2,704 changes: 2,399 additions & 305 deletions bun.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion migration-tracking/plans/kilo-opencode-v2-plan-progress.md
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ These file counts are not interchangeable with the inventory rows above. They in

Recorded verification includes focused package tests, isolated real-host execution, loopback service contracts, rendered UI fixtures, terminal round trips, and real local artifact apply/rollback. Earlier successful runs apply to their checkpoints and are not evidence that every current package is green.

The original extension and its six webviews/two workers build. The latest lifecycle regression verifies completed responses return to idle and interruption succeeds even without cached local activity. Full extension typechecking still fails on incomplete port surfaces, and final desktop verification of that correction remains unrun.
The original extension and its six webviews/two workers build. The latest lifecycle regression verifies completed responses return to idle and interruption succeeds even without cached local activity. Full extension typechecking still fails on incomplete port surfaces, so the preview package's `typecheck` script now skips with a pointer to #14016 while `typecheck:port` retains the real check. Final desktop verification of that correction remains unrun.

No new runtime acceptance is claimed by this document update or by completion of the source audit. External service verification, production distribution, and full platform validation remain open.

Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@
"solid-list": "0.3.0",
"string-width": "7.2.0",
"tailwindcss": "4.1.11",
"virtua": "0.49.1",
"vite": "7.3.6",
"@solidjs/meta": "0.29.4",
"@solidjs/router": "1.0.0",
Expand Down
2 changes: 2 additions & 0 deletions packages/kilo-ide-ui/src/types/file-content.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ export type FileContent = {
type: "text" | "binary"
content: string
diff?: string
encoding?: "base64"
mimeType?: string
patch?: {
oldFileName: string
newFileName: string
Expand Down
3 changes: 2 additions & 1 deletion packages/kilo-ide-ui/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,15 @@
"allowSyntheticDefaultImports": true,
"esModuleInterop": true,
"isolatedModules": true,
"verbatimModuleSyntax": false,
"module": "ESNext",
"moduleResolution": "bundler",
"noEmit": true,
"lib": ["es2023", "dom", "dom.iterable"],
// Type Checking & Safety
"strict": true,
"noUncheckedIndexedAccess": false,
"types": ["vite/client", "bun"],
"baseUrl": ".",
"paths": {
"@kilocode/client/*": ["../kilo-client/src/*"]
}
Expand Down
3 changes: 2 additions & 1 deletion packages/kilo-vscode/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -1192,7 +1192,8 @@
"scripts": {
"extension": "bun script/dev.ts",
"build": "bun script/build.ts",
"typecheck": "tsgo --noEmit",
"typecheck": "bun script/typecheck.ts",
"typecheck:port": "tsgo --noEmit",
"test": "bun test test/connection.test.ts test/web-server.test.ts test/extension-entry.test.ts",
"test:native": "bun script/test-existing-extension.ts",
"package": "bun script/package.ts"
Expand Down
7 changes: 1 addition & 6 deletions packages/kilo-vscode/src/KiloProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2793,10 +2793,7 @@ export class KiloProvider implements vscode.WebviewViewProvider, TelemetryProper

const action = await vscode.window.showWarningMessage(`Config: ${summary}`, "Show Details")
if (action === "Show Details") {
const lines = list.map((w) => {
const base = `${w.path}\n ${w.message}`
return w.detail ? `${base}\n ${w.detail}` : base
})
const lines = list.map((w) => `${w.path}\n ${w.message}`)
const channel = vscode.window.createOutputChannel("Kilo Config Warnings")
channel.clear()
channel.appendLine(lines.join("\n\n"))
Expand Down Expand Up @@ -3685,7 +3682,6 @@ export class KiloProvider implements vscode.WebviewViewProvider, TelemetryProper
agent,
variant,
editorContext,
snapshotInitialization: this.opts.snapshotInitialization,
}),
sid,
messageID,
Expand Down Expand Up @@ -3771,7 +3767,6 @@ export class KiloProvider implements vscode.WebviewViewProvider, TelemetryProper
agent,
variant,
parts,
snapshotInitialization: this.opts.snapshotInitialization,
}),
sid,
messageID,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,6 @@ export async function prompt(input: {
directory: dir,
messageID: `msg_agent_manager_${input.messageID}`,
parts: [{ type: "text", text: input.text }],
snapshotInitialization: SNAPSHOT_INITIALIZATION,
},
{ throwOnError: true },
)
Expand Down
3 changes: 2 additions & 1 deletion packages/kilo-vscode/src/agent-manager/provider-lifecycle.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import type { KiloClient, Session } from "../backend/index"
import type { SessionMetadata } from "@opencode-ai/client/promise"
import { getErrorMessage } from "../kilo-provider-utils"
import type { AgentManagerOutMessage } from "./types"
import { PLATFORM } from "./constants"
Expand Down Expand Up @@ -42,7 +43,7 @@ export interface LifecycleHost {
capture: (event: string, props: Record<string, unknown>) => void
autoName: () => { enabled: boolean }
client: () => KiloClient
metadata: (client: KiloClient, dir: string) => Promise<Record<string, unknown>>
metadata: (client: KiloClient, dir: string) => Promise<SessionMetadata>
post: (message: AgentManagerOutMessage) => void
log: (...args: unknown[]) => void
}
Expand Down
4 changes: 2 additions & 2 deletions packages/kilo-vscode/src/agent-manager/tool-start.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import type { KiloClient, Session } from "../backend/index"
import type { SessionMetadata } from "@opencode-ai/client/promise"
import { sanitizeBranchName, versionedName } from "./branch-name"
import type { CreateWorktreeResult } from "./WorktreeManager"
import type { WorktreeStateManager } from "./WorktreeStateManager"
Expand Down Expand Up @@ -54,7 +55,7 @@ export interface ToolDeps {
cleanupWorktree: (wid: string, dir: string) => Promise<void>
setup: (dir: string, branch?: string, id?: string) => Promise<void>
createSessionInWorktree: (dir: string, branch: string, id?: string, source?: ToolSource) => Promise<Session | null>
sessionMetadata: (client: KiloClient, dir: string) => Promise<Record<string, unknown>>
sessionMetadata: (client: KiloClient, dir: string) => Promise<SessionMetadata>
registerWorktreeSession: (sid: string, dir: string) => void
notifyReady: (sid: string, result: CreateWorktreeResult, wid?: string) => void
push: () => void
Expand Down Expand Up @@ -116,7 +117,6 @@ async function prompt(client: KiloClient, sid: string, dir: string, task: ToolTa
parts: [{ type: "text", text: body }],
model: task.model,
variant: task.variant,
snapshotInitialization: SNAPSHOT_INITIALIZATION,
},
{ throwOnError: true },
)
Expand Down
2 changes: 1 addition & 1 deletion packages/kilo-vscode/src/backend/settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -728,7 +728,7 @@ export function createSettingsMethods(client: OpenCodeClient, defaultDirectory:
},
global: {
config: {
get: <Throw extends boolean = false>(_input: Record<string, never> = {}, options?: AdapterOptions<Throw>) =>
get: <Throw extends boolean = false>(options?: AdapterOptions<Throw>) =>
result(async () => (await views(undefined, options)).globalView, options),
update: <Throw extends boolean = false>(
input: { config: Partial<Config>; directory?: string; workspace?: string },
Expand Down
6 changes: 3 additions & 3 deletions packages/kilo-vscode/src/provider-actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Provider action handlers extracted from KiloProvider to stay under max-lines.
* These are pure async functions that operate on the SDK client — no vscode dependency.
*/
import type { Config, KiloClient } from "./backend/index"
import type { Config, KiloClient, Provider } from "./backend/index"
import { validateProviderID as validateProviderIDShared } from "./shared/custom-provider"
import {
resolveCustomProviderAuth,
Expand Down Expand Up @@ -71,7 +71,7 @@ export async function fetchProviderData(client: KiloClient, dir: string) {
])
const authStates: Record<string, AuthState> = {}
const storedKeys: Record<string, StoredProviderKey> = {}
const all = response.all.map((item) => {
const all = response.all.map((item: Provider) => {
const raw = item as Record<string, unknown>
if (typeof raw.id === "string" && typeof raw.key === "string" && raw.key) {
authStates[raw.id] = "api"
Expand Down Expand Up @@ -381,7 +381,7 @@ export async function disconnectProvider(
const configured = !!cfg || !!effective
const custom = customProvider(cfg) || customProvider(effective)
const { response } = await fetchProviderData(ctx.client, ctx.workspaceDir)
const active = response.all.find((item) => item.id === id)
const active = response.all.find((item: Provider) => item.id === id)
const oauth = active?.source === "custom" && configured && !custom

// Config-sourced providers may not have auth store entries because
Expand Down
2 changes: 1 addition & 1 deletion packages/kilo-vscode/src/services/autocomplete/fim.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export async function generateFim(
{
signal,
sseMaxRetryAttempts: 1,
onSseError: (error) => {
onSseError: (error: unknown) => {
sseError = error instanceof Error ? error : new Error(String(error))
},
},
Expand Down
5 changes: 3 additions & 2 deletions packages/kilo-vscode/src/shared/sandbox-session.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import type { KiloClient } from "../backend/index"
import type { SessionMetadata } from "@opencode-ai/client/promise"
import type { SandboxPreference } from "../services/sandbox-preference"

export const SANDBOX_METADATA_KEY = "kilocode.sandbox"

export function sandboxMetadata(enabled: boolean, metadata?: Record<string, unknown>) {
export function sandboxMetadata(enabled: boolean, metadata?: SessionMetadata): SessionMetadata {
return {
...metadata,
[SANDBOX_METADATA_KEY]: {
Expand All @@ -25,7 +26,7 @@ export async function sandboxSessionMetadata(
preference: SandboxPreference | undefined,
client: KiloClient,
directory: string,
metadata?: Record<string, unknown>,
metadata?: SessionMetadata,
) {
return sandboxMetadata(await sandboxDefault(preference, client, directory), metadata)
}
5 changes: 3 additions & 2 deletions packages/kilo-vscode/test/backend-settings.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import type { Layout } from "../../kilo-cli/src/paths"
import { launch } from "../../kilo-cli/src/interactive-server"
import { connectV2 } from "../src/connection"
import { createSettingsMethods } from "../src/backend/settings"
import type { Config } from "../src/backend/index"

function makeLayout(root: string): Layout {
const paths = {
Expand Down Expand Up @@ -181,7 +182,7 @@ test("config adapter translates v1 config calls through native reads and the set
.data!
expect(updated.shell).toBe("/bin/sh")
await expect(
methods.config.update({ config: { nope_provider: { name: "nope" } } }, { throwOnError: true }),
methods.config.update({ config: { nope_provider: { name: "nope" } } as Partial<Config> }, { throwOnError: true }),
).rejects.toThrow("unsupported config keys: nope_provider")

// Global writes route to the profile scope; the project scope keeps
Expand All @@ -207,7 +208,7 @@ test("config adapter translates v1 config calls through native reads and the set
expect(globalWritten.global.shell).toBe("/bin/global-shell")
expect(globalWritten.effective.shell).toBe("/bin/sh")

const globalGet = (await methods.global.config.get({}, { throwOnError: true })).data!
const globalGet = (await methods.global.config.get({ throwOnError: true })).data!
expect(globalGet.shell).toBe("/bin/global-shell")
expect(globalGet.tool_output?.max_lines).toBeUndefined()
expect((await methods.config.get({}, { throwOnError: true })).data!.shell).toBe("/bin/sh")
Expand Down
Loading