feat: file-tool verification diffs, TUI model picker, and file viewer - #378
Merged
rschardosin merged 7 commits intoJul 30, 2026
Merged
Conversation
Return OpenCode-style verification_context hunks from edit_file (modify, insert, delete, multi-line, regex) and write_file (create/overwrite) so agents can confirm changes without re-reading files. Fix make docker-incus to build the host-native Linux binary, load the image into the local Docker daemon, and retag :latest for dev runtimes. Also add a terminal /model provider→model picker with client API support for listing models and pinning provider/model on chat turns.
Prefer tool result verification_context (real line numbers and surrounding context) when available; fall back to args while tools are still running. Display ---/+++/@@ ± body with colored markers and wire activity +N/−M stats from the same source.
Promote successful edit_file/write_file changes to ItemFileDiff on the transcript (editor-style old/new line gutters + ± content). Keep the activity fold for raw request args and response JSON only. Layout: user → activity → file_diff(s) → agent.
Do not use the total composer line count for [Pasted: N lines]. Single-line pastes and line-by-line injection stay expanded; only a multi-line paste insert collapses.
Only emit ItemFileDiff when verification_context is present (set after a successful write/edit). Failed tools still carry content in args; using args alone incorrectly showed a diff. Also treat common Go error strings like "failed to write … permission denied" as tool errors.
Add a clickable "Files generated" list in the chat transcript with a full-screen file viewer (Esc to return). Wire Studio artifact/report_marker SSE events and session history artifacts through the platform backend, and fetch content via GET /api/studio/artifacts/content.
rschardosin
deleted the
feat/file-tool-diff-verification-and-tui-model-picker
branch
July 30, 2026 02:16
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
edit_fileandwrite_filereturn unified-styleverification_contexthunks (modify / insert / delete / multi-line / regex; create / overwrite) so agents can confirm changes without a follow-upread_file.make docker-incusbuilds the host-native Linux binary,--loads into the local Docker daemon, and retags:latestso Docker+Incus runtimes pick up local tool changes./modelprovider → model picker with client API support for listing models and pinning provider/model on chat turns.Test plan
go test ./pkg/tools -run 'EditFile|WriteFile|Verification'go test ./pkg/tui/...edit_file/write_fileshows dual-gutter diff on main thread; failed permission write does not/modellists providers/models and pins for the next turnmake docker-incus+ container recreate +sandbox refresh --force, sandboxedit_filereturns(line N)+ hunk verification