Commit graph

9 commits

Author SHA1 Message Date
Aiden Cline
93cc5e8dff refactor(opencode): model truncation limits as Option
Replace the `{ enabled: boolean; maxLines: number; maxBytes: number }`
shape with `Option<{ maxLines: number; maxBytes: number }>` so the absence
of limits is represented by the type system instead of a boolean flag with
dead numeric fields.

- Truncate.limits() now returns Effect<Option<Limits>>.
- Truncate.output() short-circuits on None instead of checking .enabled.
- shell tool gates rolling buffer, disk spill, and tail truncation on
  Option.isSome(limits); behavior unchanged when truncation is enabled.
- ShellPrompt.render and helpers accept Option<Limits>; the truncation
  guidance line is omitted when None.
- Tests updated to assert Option.isSome / Option.isNone.
2026-05-24 23:06:06 -05:00
Aiden Cline
3fcdf94873 merge origin/dev into issue-13770-tool-output-docs
Resolve conflict in packages/opencode/src/tool/shell/prompt.ts to combine
truncationGuidance helper (which omits the truncation note when truncation
is disabled) with the configurable defaultTimeoutMs from origin/dev.

Fix typecheck in tool/truncate.ts by narrowing the tool_output union before
reading max_lines and max_bytes.
2026-05-23 21:23:36 -05:00
Aiden Cline
ba437069e6
fix(opencode): advertise configured shell timeout (#28998)
Co-authored-by: Nabs <nabil@instafork.com>
2026-05-23 10:43:39 -05:00
Aiden Cline
1edba25dfb feat(core): allow disabling tool output truncation 2026-05-22 17:20:58 -05:00
Shoubhit Dash
0c9cfe923f
refactor(instance): remove legacy runtime fallback (#27757) 2026-05-15 23:05:44 +05:30
Shoubhit Dash
f202226bbc
refactor(flags): move bash timeout to runtime flags (#27607) 2026-05-15 02:49:14 +05:30
Shoubhit Dash
e26abd8da9
fix(tool): close shell truncation stream (#27517) 2026-05-14 16:34:42 +05:30
opencode-agent[bot]
9d03d4419e chore: generate 2026-05-02 23:20:15 +00:00
Luke Parker
3f459819ba
feat: refactor bash tool with shell-aware prompts for bash, pwsh+powershell, and cmd (#20039) 2026-05-03 09:18:48 +10:00
Renamed from packages/opencode/src/tool/bash.ts (Browse further)