Skip to content
This repository was archived by the owner on Feb 25, 2026. It is now read-only.

OpenCode v1.1.65#440

Merged
kevinvandijk merged 18 commits into
devfrom
kevinvandijk/kilo-opencode-v1.1.65
Feb 18, 2026
Merged

OpenCode v1.1.65#440
kevinvandijk merged 18 commits into
devfrom
kevinvandijk/kilo-opencode-v1.1.65

Conversation

@kevinvandijk

Copy link
Copy Markdown
Contributor

Core

Revert token substitution in OPENCODE_CONFIG_CONTENT
Ensure @-mentioning a directory uses the read tool instead of deprecated list tool
Add tool.definition hook for plugins to modify tool description and parameters
Remove worktree delete functionality
Resolve ACP hanging indefinitely in thinking state on Windows

Desktop

Reconnect event stream on disconnect
Toggle all provider models in settings
Clean up desktop loading page
Notification should navigate to session
Fix prompt input behavior quirks
Failed to create store in app
Only show loading window if SQLite migration is necessary

@kevinvandijk kevinvandijk marked this pull request as ready for review February 18, 2026 18:55
)
log.debug("loaded custom config from KILO_CONFIG_CONTENT")
result = mergeConfigConcatArrays(result, JSON.parse(Flag.KILO_CONFIG_CONTENT))
log.debug("loaded custom config from OPENCODE_CONFIG_CONTENT")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WARNING: Log message references OPENCODE_CONFIG_CONTENT but the env var is KILO_CONFIG_CONTENT. The old code correctly logged "loaded custom config from KILO_CONFIG_CONTENT" — this change introduces a misleading log message.

Suggested change
log.debug("loaded custom config from OPENCODE_CONFIG_CONTENT")
log.debug("loaded custom config from KILO_CONFIG_CONTENT")

await load(Flag.KILO_CONFIG_CONTENT, path.join(Instance.directory, "KILO_CONFIG_CONTENT")),
)
log.debug("loaded custom config from KILO_CONFIG_CONTENT")
result = mergeConfigConcatArrays(result, JSON.parse(Flag.KILO_CONFIG_CONTENT))

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WARNING: JSON.parse() is called without error handling. If KILO_CONFIG_CONTENT contains malformed JSON, this will throw an unhandled exception and crash config loading entirely. The previous implementation routed through load() which likely had its own error handling.

Consider wrapping in a try/catch or validating the JSON before parsing.

export const KILO_CONFIG = process.env["KILO_CONFIG"]
export declare const KILO_CONFIG_DIR: string | undefined
export declare const KILO_CONFIG_CONTENT: string | undefined
export const KILO_CONFIG_CONTENT = process.env["KILO_CONFIG_CONTENT"]

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WARNING: This changes KILO_CONFIG_CONTENT from a dynamic getter (evaluated at access time) to a static const (evaluated at module load time). The removed Object.defineProperty block had a comment explaining: "This must be evaluated at access time, not module load time, because external tooling may set this env var at runtime."

If any external tooling (e.g., the desktop app or ACP) sets KILO_CONFIG_CONTENT after this module is first imported, the new value will not be picked up. Is this intentional?

getWslEnabled: async () => {
const next = await commands.getWslConfig().catch(() => null)
if (next) return next.enabled
return window.__KILO__!.wsl ?? false

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WARNING: window.__KILO__! uses a non-null assertion. If commands.getWslConfig() rejects (caught → returns null) and window.__KILO__ is undefined, this will throw a runtime TypeError. Consider using optional chaining instead:

Suggested change
return window.__KILO__!.wsl ?? false
return window.__KILO__?.wsl ?? false


onCleanup(() => {
active = false
listener.then((cb) => cb())

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SUGGESTION: The listener promise has no .catch() handler. If events.sqliteMigrationProgress.listen() rejects, this will produce an unhandled promise rejection during cleanup. Consider adding .catch(() => undefined) for safety:

Suggested change
listener.then((cb) => cb())
listener.then((cb) => cb()).catch(() => undefined)

@kilo-code-bot

kilo-code-bot Bot commented Feb 18, 2026

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: 5 Issues Found | Recommendation: Address before merge

Overview

Severity Count
CRITICAL 0
WARNING 4
SUGGESTION 1
Issue Details (click to expand)

WARNING

File Line Issue
packages/opencode/src/config/config.ts 266 Log message references OPENCODE_CONFIG_CONTENT but env var is KILO_CONFIG_CONTENT
packages/opencode/src/config/config.ts 265 JSON.parse() on KILO_CONFIG_CONTENT without error handling — malformed JSON will crash config loading
packages/opencode/src/flag/flag.ts 12 KILO_CONFIG_CONTENT changed from dynamic getter to static const — runtime env var changes won't be picked up
packages/desktop/src/index.tsx 369 Non-null assertion window.__KILO__! can throw if window.__KILO__ is undefined

SUGGESTION

File Line Issue
packages/desktop/src/loading.tsx 44 Missing .catch() on listener promise in cleanup
Files Reviewed (20 files)
  • packages/app/src/app.tsx - 0 issues
  • packages/app/src/components/dialog-manage-models.tsx - 0 issues
  • packages/app/src/components/prompt-input.tsx - 0 issues
  • packages/app/src/components/prompt-input/editor-dom.test.ts - 0 issues
  • packages/app/src/components/prompt-input/editor-dom.ts - 0 issues
  • packages/app/src/components/prompt-input/history.ts - 0 issues
  • packages/desktop/src/index.tsx - 1 issue
  • packages/desktop/src/loading.tsx - 1 issue
  • packages/opencode/src/config/config.ts - 2 issues
  • packages/opencode/src/flag/flag.ts - 1 issue
  • packages/opencode/src/project/project.ts - 0 issues
  • packages/opencode/src/session/prompt.ts - 0 issues
  • packages/opencode/src/snapshot/index.ts - 0 issues
  • packages/opencode/src/tool/registry.ts - 0 issues
  • packages/opencode/src/util/git.ts - 0 issues
  • packages/opencode/src/worktree/index.ts - 0 issues
  • packages/opencode/test/config/config.test.ts - 0 issues
  • packages/opencode/test/project/project.test.ts - 0 issues
  • packages/opencode/test/project/worktree-remove.test.ts - 0 issues
  • packages/plugin/src/index.ts - 0 issues
  • packages/ui/src/components/avatar.tsx - 0 issues
  • packages/ui/src/components/list.tsx - 0 issues
  • packages/ui/src/components/switch.tsx - 0 issues
  • packages/ui/src/components/toast.css - 0 issues

Fix these issues in Kilo Cloud

@kevinvandijk kevinvandijk merged commit c96b670 into dev Feb 18, 2026
10 checks passed
@kevinvandijk kevinvandijk deleted the kevinvandijk/kilo-opencode-v1.1.65 branch February 18, 2026 19:15
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants