Repository navigation
Add completions menu for files and folders - #8
Conversation
|
will look at this first thing today; looks great! just to be clear, there are two features at play here: the @file/folder/symbol feature is a mechanism for explicitly adding content to the context (a la cursor, and others), is this that? or is this file path completion? both are great, we'd just want to switch to having the |
|
I modeled it more for the cursor like mechanism as you will see in the implementation, but since the view tool is able to pick up file paths just from the text it works like the latter for now. If needed I can add the file contents statically to the context as well. Whichever way you feel works best with the project. It can be / now and then when we add git or lsp support it can become @ with all the changes to ui that accompany adding another completion provider |
|
@Adictya this is incredible, seriously, thank you so much for going out of your way to make the codebase better. ❤️ my only two thoughts/questions:
|
|
Hey thanks a lot @adamdottv , it was a great experience. Always a joy to simplify code.
|
|
on the bubbles thing, you made the right call, and i suspected their list might not be configurable enough! your version is perfect, fits the needs of the app exactly |
|
@adamdottv Changed the initiation key to '/' |
…d dank Windows Command Execution Fixes: - Add detectCommandShell() and parseCommand() functions for shell detection - Implement direct PowerShell execution bypassing cmd.exe wrapper - Add shell built-ins detection and needsShellExecution function - Fix stream draining to prevent race conditions (Promise.all) - Remove duplicate abort listeners Edit Tool Improvements: - Add newString validation guard (handles undefined/null/empty) - Add UnicodeNormalizedReplacer for smart quotes and em-dashes - Fix multi-line pattern matching with empty lines (Issue anomalyco#26) - Add unique match identification for replaceFirst functionality - Improve block anchor matching with variable gap handling Documentation: - Add verified-fixes-summary.md documenting all fixed issues - Add windows-command-execution-issues.md comprehensive analysis - Add linux-unix-mac-compatibility-analysis.md for cross-platform impact Fixes: Issues anomalyco#2, anomalyco#3, anomalyco#4, anomalyco#5, anomalyco#7, anomalyco#8, anomalyco#9, anomalyco#15, anomalyco#19, anomalyco#26
…drock undefined messages - processor.ts: add MAX_RETRIES=10 cap to prevent infinite retry storms (Issue #1) - processor.ts: preserve metadata on tool-error state updates (Issue #8) - error.ts: handle Bedrock literal 'undefined' message for overflow detection (Issue #2) - task.ts: check result.info.error to surface subagent failures to parent (Issue #3) - test/provider/error.test.ts: 17 tests covering parseAPICallError + parseStreamError - docs/09-temp/issues.md: full RCA documentation for 9 identified issues
* feat(opencode): add `cljfmt` formatter support for Clojure files (anomalyco#13426) * fix(website): correct zh-CN translation of proprietary terms in zen.mdx (anomalyco#13734) Co-authored-by: Copilot <[email protected]> Co-authored-by: copilot-swe-agent[bot] <[email protected]> * chore: generate * desktop: use process-wrap instead of manual job object (anomalyco#13431) * feat(opencode): Add Venice support in temperature, topP, topK and smallOption (anomalyco#13553) * feat(opencode): add conservative workspace hot reload * fix(opencode): reset caches and emit hot reload event * feat(experimental): add hot reload API trigger * chore(sdk): regenerate OpenAPI for hot reload * test(hotreload): gate darwin path alias on macOS * chore(flags): simplify hot reload gating * chore(flags): align hot reload env with experimental * feat(hotreload): emit change events and support manual mode * feat(hotreload): make reload userland-driven * chore(sdk): include hot reload changed event * feat(hotreload): reset plugins, tools, and mcp on apply * fix(cli): allow --agent with --attach * Revert "fix(cli): allow --agent with --attach" This reverts commit 7f1c77f. * fix(hotreload): apply within instance context --------- Co-authored-by: Salam Elbilig <[email protected]> Co-authored-by: Pan Kaixin <[email protected]> Co-authored-by: Copilot <[email protected]> Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: opencode-agent[bot] <opencode-agent[bot]@users.noreply.github.com> Co-authored-by: Brendan Allan <[email protected]> Co-authored-by: dpuyosa <[email protected]> Co-authored-by: Benjamin Shafii <[email protected]>
…odies - Refresh VCS state before idempotency check in create() to avoid TOCTOU race (anomalyco#4, anomalyco#12) - Use refreshed branch/defaultBranch in fallback PR return (anomalyco#9) - Validate base branch exists before attempting gh pr create (anomalyco#22) - Wrap review comment bodies in fenced blocks for structural separation (anomalyco#8)
…drock undefined messages - processor.ts: add MAX_RETRIES=10 cap to prevent infinite retry storms (Issue #1) - processor.ts: preserve metadata on tool-error state updates (Issue #8) - error.ts: handle Bedrock literal 'undefined' message for overflow detection (Issue #2) - task.ts: check result.info.error to surface subagent failures to parent (Issue #3) - test/provider/error.test.ts: 17 tests covering parseAPICallError + parseStreamError - docs/09-temp/issues.md: full RCA documentation for 9 identified issues
* Restructure watchdogTick so idle-detection sweeps
SessionActivity.list() independently of stuck-tool
query results — fixes Bug anomalyco#4 (idle gated behind
stuck-tool results) and Bug anomalyco#5 (leaf.length === 0
early return skipping idle detection entirely)
* Add pre-cancel map cleanup in the idle sweep to
prevent unbounded growth of stale entries
* Define CancelRequested bus event in processor and
publish from abortChildren so child sessions get
in-memory cancel alongside the DB updates (Bug anomalyco#7)
* Add SessionPrompt.init() subscribing to the event,
called from bootstrap alongside SessionActivity
* Wrap AI SDK iterator consumption in try/finally to
call iter.return() on abort, preventing leaked HTTP
connections (Bug anomalyco#8)
* Check abort signal before retry continue to stop
cancelled sessions from restarting loops (Bug anomalyco#9)
* Remove shadowed abort promise in permission-check
loop so pre-aborted signals reject immediately
instead of hanging (Bug anomalyco#10)
* Update watchdog tests for independent idle sweep
and add cancel-propagation event tests
…yout Batch fix for issues found in the user's workflow session: 1. **Master not woken on final node.completed (anomalyco#7)**. The wake subscriber at workflow/index.ts:1820 dropped ALL wakes when workflow was in a terminal state. The user reported the FIRST nodes wake master fine, but the LAST node's completion races with the master's `workflow_finalize` call — by the time the node.completed event hits the subscriber, workflow.status is already "completed" and the wake gets silently dropped. Now "signal" kinds (node.completed / failed / interrupted / attempt_reported / budget_exceeded / stalled / checkpoint.*) ALWAYS wake master regardless of workflow status; chrome kinds (wake_*, pulled, command_acked, graph.edit.*) still drop on terminal so we don't wake forever. 2. **Session compaction silent failure (anomalyco#8)**. compaction.ts only published `session.compacted` on success — failure paths only set `message.error` on the last assistant message which was invisible unless the user scrolled back. The session just "froze" with no indication. Added a new `session.compaction_failed` bus event, wired the frontend event-reducer to park it on a new `sessionError[sessionID]` slot, and the workflow chat panel now appends a system message banner (`⚠ 会话压缩失败:…`) with actionable guidance (new session, bigger model context window). Successful re-compaction clears the banner. 3. **Question dialog deadlock in node sessions (anomalyco#9)**. Frontend polling for /question and /permission was gated on `status() === "running"` — but a sub-agent calling question() transitions to idle BEFORE the master picks it up, so polling stopped and the dialog never appeared, locking the session. Removed the gate; polling runs unconditionally every 2s now (cheap, returns [] when empty). 4. **Per-task node-card state leak (anomalyco#4)**. `workflowOpenTabs` was a global array — opening a node card under Task A left it visible after switching to Task B. Re-keyed by sessionId (now `Record<sessionID, OpenTab[]>`). Substrip render reads `workflowOpenTabs[params.id]`, opens/closes write through the current sessionId. Switching tasks now shows that task's own opened tabs. 5. **Refiner merge button no-op (anomalyco#1)**. Merge button was reading `selectedIds()` but the actual list-level multi-select bound to `mergeIDs` (a separate signal used by the MergeTray). Header button now reads/writes the same `mergeIDs` set the list uses, so shift-click selection -> merge button enable -> merge action all flow through one state. 6. **Refiner search input only takes one char per keystroke (anomalyco#11)**. The two search `<input>`s (line ~3815 and ~6107 of refiner-page) were missing `onCompositionStart/End` handlers. Chinese pinyin IME fires intermediate input events during composition; the controlled signal update reset the input every keystroke, breaking multi-char input. Added composition tracking that suppresses setQuery() while composing. 7. **Node-session layout (anomalyco#5)**. The outer `<div className="flex h-full flex-col">` of NodeSessionView had no horizontal sizing — `flex-col` parent's `flex-1` granted vertical grow but not width fill. Result: chat collapsed to content width, plugin slot didn't reach right edge, splitbar drag moved the whole right column left instead of resizing chat. Adding `w-full min-w-0 flex-1` to the root + `w-full min-w-0` to the body row fixes all three symptoms (whitespace left, narrow right, drag misbehavior). 8. **Rail overflow with many tasks (anomalyco#10)**. `.rune-rail-sec` had no `overflow-y: auto` or flex sizing — task list pushed beyond viewport when >N tasks. Set `flex: 1 1 auto; min-height: 0; overflow-y: auto` so the section scrolls independently while the rail brand / footer stay anchored. Not addressed in this batch (deferred for separate discussion): - Bug 2 / Bug 3 (action-budget architecture): structural change - Bug 6 (context limit on node create): largely covered by the earlier workflow_read trim; ship and observe. Co-Authored-By: Claude Opus 4.7 <[email protected]>
…elease-workflow ci: switch macOS release to tauri-action
…seline Round 5 完成: - 新增 ReRefineModal 组件 + 「⇄ 全局整理」按钮(refiner-page substrip): 打开后扫描整库 (GET /experimental/refiner/global-rerefine/plan) 并按 五类列出候选: 疑似重复对 / 只出现一次的 tag / 孤儿 / 长期未用 / 显式 冲突. 每行带 Accept/Dismiss; Accept 走现有 merge/delete 端点; Dismiss 只在本次会话隐藏行. CSS 配套 .rf-rerefine-* 类. - in-flight 失败即时沉淀: workflow/index.ts 的 EventCreated bus listener 在 node.failed / node.attempt_limit_reached / node.budget_exceeded / checkpoint.failed 之一触发时 fire-and-forget 调用 Refiner.observe- WorkflowCompletion(source: "auto"). 不再只在 workflow.finalize 一次性 沉淀, 失败可在发生当下被捕获并 sediment 成 workflow_pattern. refiner 的 auto_enabled gate + observation 去重保证不会刷屏. - anomalyco#7 验证 (slave exp 注入): 确认 BASELINE_KINDS gate + agentLayer 路径 确实为 slave 走注入. 新增 workflow_pattern 到 BASELINE_KINDS, 让上一 版本的 workflow-level sediment 实际能被 slave 在启动时拉到 system prompt 里 (而不是干躺在库里). anomalyco#8 (code change 多 git 层级): 在 snapshot/index.ts 加 KNOWN LIMITATION 注释 — shadow git 把嵌套 .git 视为 gitlink, 内部文件改动看不到. 修 正确做法需要在 stage 前临时重命名嵌套 .git, 风险大 (进程中断 = 用户 git 找不回). 留 follow-up 工单, 暂不强行 ship. Round 7 (perf — 消息列表虚拟化 + LRU session 卸载): 多日级架构改造, 暂不在本轮 ship. Co-Authored-By: Claude Opus 4.7 <[email protected]>
anomalyco#3 slave card state: persist `sessionNode` overlay to localStorage keyed by the workflow's root session id. Switching to Trace / Knowledge rails no longer wipes the opened slave-card overlay; the key is scoped per workflow so unrelated runs don't bleed state. anomalyco#10 image attachments in chat composer: paste / drop image files into the chat textarea, render thumbnails above the input, send as `file` parts via promptAsync(). Optimistic update mirrors the on-wire shape so the user sees their thumbnail in their own bubble immediately. Backward compatible — old callers that ignore the new `attachments` callback arg still work. anomalyco#1+anomalyco#8 push-driven runtime commands: split the slave-session prompt helper into `kickoffSlave()` (full preamble, fires once when a node starts) and `pushRuntimeCommand()` (just the command+ack, fires on every workflow_control). Previous code re-injected the full "You are executing workflow node X" preamble on every command push, so the slave saw the same framing 5+ times per run. New `pushRuntimeCommand` includes the actual command payload inline and explicitly tells the slave NOT to call workflow_pull — push IS the authoritative path; pull is fault-tolerance only. anomalyco#4 reasoning-step re-retrieve + compact re-injection: prompt loop now re-retrieves experiences every 6 tool-call steps (was: only step 1 of a turn), to counter slave drift on long chains. After compaction, the auto-continue path detects workflow sessions via Workflow.nodeBySession and prepends a brief "[compact-restoration]" framing that lists the node id, status, and any pending commands — so the slave doesn't think it's plain chat after history truncation. anomalyco#5 real pause semantics: pauseNode now flips status BEFORE cancelling the session, so any tool-call mid-flight sees the status-machine guard and its workflow_update gets rejected as illegal transition. Workflow.control refuses to enqueue new commands when status is `paused` or `cancelled`, returning a structured `refused: true` so the orchestrator stops retrying. anomalyco#6 serial-port multiplex: Serial.create checks for an existing session on the same device path with matching transport params before opening a fresh SerialPort instance. Returns the existing SerialID so the Serial Monitor UI and the debug-node serial_create tool can share a single physical port instead of racing for EBUSY. Co-Authored-By: Claude Opus 4.7 <[email protected]>
…lt, http://* Replace over-broad default grants with the minimum set the UI actually needs: - shell:default → shell:allow-open (only shellOpen(url) is called from the frontend — no shell:execute). - process:default → process:allow-restart (relaunch is the only usage; exit-arbitrary is not). - http:default now scopes to https://* and the loopback http origins (localhost / 127.0.0.1). Plain-HTTP arbitrary hosts are refused; users who need an insecure remote provider must opt in explicitly rather than getting it by default. - opener:allow-open-path entries with "app": true are removed; the app alias is now validated server-side (validate_open_app_name) and the `open_path` Tauri command already gates the filesystem target (validate_open_target), so the extra "app": true surface is redundant and only widened the XSS blast radius. Closes #8/21.
…docs audit - run_agent: collect all tool calls per turn instead of breaking after the first ToolCallEnd (bug anomalyco#1) - provider: replace single tool_call_id with index-based Vec to correctly route interleaved parallel tool call args in SSE stream (bug anomalyco#2) - explore agent: mode 'subagent' -> 'explore' so tools_for_mode strips write tools as intended (bug anomalyco#3) - session_input: remove orphaned dead module with no consumers (bug anomalyco#4) - ToolContext: add shutdown flag, run_agent checks it for early exit (bug anomalyco#5) - todowrite: preserve stable task IDs by title-matching existing entries instead of positional reassignment (bug anomalyco#6) - agent descriptions: remove false parallel-execution claims (bug anomalyco#7) - run_agent: last_assistant now updated on tool-call-only turns (bug anomalyco#8) - debug CLI: add task add/delete subcommands + SessionStore.delete_task (bug anomalyco#9) - worker.rs: replace production unwrap() with if-let guard (bug anomalyco#10) - AGENTS.md: fix platform (Linux-only -> cross-platform), branch names, core/ module list, provider/ trait location
… record the 6 root causes Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
…preflight Covers the correctness and observability gaps found in the CAR integration audit. Stop degrading silently (anomalyco#8). Every CAR call falls back rather than failing the turn, which is right — CAR is an augmentation — but the fallbacks were silent: addFact and ingestSkill were piped through Effect.ignore, and buildContext, findSkill, listSkills and factCount swallowed errors into empty values. That is exactly how the memory-sandbox breakage went unnoticed for a whole session, with persistMemory failing on every teardown and nothing saying so. All degradations now log and are counted in a per-instance health tally reported by `opencode debug car`. ingestSkill also no longer marks a skill as ingested when the call failed, which would have masked it permanently for that instance. Honour tool idempotency (anomalyco#9). The proposal hardcoded idempotent:false even though registerToolSchema already carried the tool's real hint, so CAR could never dedupe an idempotent tool. max_retries stays 0 deliberately: a CAR-side retry re-invokes our dispatcher and re-runs the tool for real, so raising it needs CAR's retry semantics verified first (car-releases#76). Weight facts by how they were obtained (anomalyco#9). addFact now passes CAR's confidence argument, which was never supplied. Things observed directly — the user's own words, a tool's actual result or failure — are ground truth; model-generated prose is an assertion and should not outweigh them. Add real recall (anomalyco#10). Memory was write-only: addFact fired constantly but queryFacts was never called and the only read path was buildContext's opaque blob. The service now exposes graph-spreading-activation recall, available as `opencode debug car --recall <text>`. Harden the runner (anomalyco#11). Registration retries with exponential backoff, a dropped socket clears the memoized connection so the next call re-registers rather than hanging on a dead runner, in-flight calls are failed instead of being left to hang, and the host's abort signal now cancels the delegated call — which matters most during the ~5s pre-dispatch window (car-releases#75). Add daemon preflight (anomalyco#12). `opencode debug car` reports reachability, client vs daemon version skew, and whether the running daemon actually knows the delegated model — the three things that otherwise only surface as a confusing mid-inference failure. Note models.list omits delegated models entirely; only models.list_unified reports them, so the obvious check reports a false negative. Full suite with CAR off: 3232 pass, 0 fail — identical to pristine upstream/dev.
UX audit anomalyco#8. A new IDE setup page in Settings renders GET /workbench/doctor for the open project: languages × language server, checks, tests and debugger, each tool ✓ (with its version) or ✗ with why (not found, does not run, blocked, or language servers off) and the command that fixes it, with a Copy button. The doctor's own command wins when its reason names one (lldb-dap behind Developer Mode: sudo DevToolsSecurity -enable); otherwise a short install table per tool. Recheck runs the doctor again. Nothing is installed for the user. The Problems empty state, the Debug Console's and the Debug tab's "not debugging" state link to it ("Set up the IDE"). Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016kVQcGfnp7YMHyyrd1vsZH
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Demo:

Adds completions menu for files and folders. You can press "@" to bring this up and fuzzy find any file in the working directory.
Built to be extensible so we can add more providers for things like git, lsp symbols etc given we also build the tools.
Adds a minimal reusable list component since I had found myself reusing a lot of code from commands dialog.
Let me know if this looks good and if the ux feels good and if its line with what you guys think this feature should look like. Also feel free to be as pedantic as you want, I want to strictly adhere to the repo coding style so if any naming/folder convention doesn't match or if any variable name is not ideal.