fix: Slash Command Autocomplete vs. Auto-Execute Fix (#2257)#2275
Open
yunus25jmi1 wants to merge 10 commits intodocker:mainfrom
Open
fix: Slash Command Autocomplete vs. Auto-Execute Fix (#2257)#2275yunus25jmi1 wants to merge 10 commits intodocker:mainfrom
yunus25jmi1 wants to merge 10 commits intodocker:mainfrom
Conversation
I have successfully implemented a root-cause fix for the issue where pressing Tab to autocomplete a slash command would immediately execute it instead of just completing the text. Root Cause Analysis: In pkg/tui/components/completion/completion.go, both Enter and Tab were bound to the same key binding, causing auto-submit completions (like slash commands) to execute immediately upon selection with either key. Solution Implemented: - Separate Tab and Enter key bindings in completion.go. - Tab now autocompletes text only (AutoExecute=false). - Enter executes the command (AutoExecute=true). - Updated editor.go to handle the AutoExecute flag. - Added comprehensive tests in pkg/tui/components/completion/autocomplete_test.go. Verification: - pkg/tui/components/completion tests: 6/6 PASS - pkg/tui/components/editor tests: PASS - Successful build of project and binary Fixes docker#2257
a5614de to
68994bd
Compare
Add three new boolean provider_opts for Google models that enable Gemini built-in tools: google_search (Google Search grounding), google_maps (Google Maps grounding), and code_execution (server-side code execution). When any built-in tool is used alongside function calling, IncludeServerSideToolInvocations is automatically set. Assisted-By: docker-agent
Add FinishReason to chat.Message and MessageUsage so API consumers can distinguish the root agent's final response from intermediate tool-call turns during live streaming. - Propagate provider's explicit finish_reason through the streaming pipeline (stop/length via early return, tool_calls tracked and preserved after the stream loop) - Infer finish_reason when the provider sends a bare EOF: tool calls present → tool_calls, content present → stop, nothing → null - Validate finish_reason against actual stream output (tool_calls requires tool calls, stop is overridden when tool calls exist) - Reconstruct LastMessage on session restore so FinishReason is available for historical sessions (scoped to parent session only)
Signed-off-by: Guillaume Tardif <guillaume.tardif@gmail.com>
Signed-off-by: Guillaume Tardif <guillaume.tardif@gmail.com>
Automated changelog update for release v1.40.0 Assisted-By: Docker Agent
Before compaction, the last ~20k tokens of messages are now kept aside and excluded from summarization. The summary item records a FirstKeptEntry index pointing to the first preserved message, and GetMessages reconstructs the conversation as [summary, kept_messages...]. This allows the LLM to continue naturally after a compaction event by retaining recent conversational context verbatim while still compacting older history. Signed-off-by: Djordje Lukic <djordje.lukic@docker.com>
Warning and error notifications no longer auto-dismiss after 3 seconds. They display an [x] close button and remain visible until the user clicks on them. Success and info notifications continue to auto-dismiss. - Add persistent() and style() methods on notification Type - Add render() method on notificationItem to centralize rendering - Add HandleClick() on Manager for mouse-based dismissal - Clamp maxWidth to prevent underflow on very narrow terminals Fixes docker#2247 Assisted-By: docker-agent
…mpletion items Execute-only items (e.g., 'Browse files...') with an empty Value would fall through to the text insertion logic, removing the trigger character and inserting a space. Add a guard to close the popup cleanly instead. Assisted-By: docker-agent
Contributor
|
@yunus25jmi1 does it fix the the call of a skill with a slash command (#1819)? |
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.
I have successfully implemented a root-cause fix for the issue where pressing Tab to autocomplete a slash command would immediately execute it instead of just completing the text.
Root Cause Analysis:
In pkg/tui/components/completion/completion.go, both Enter and Tab were bound to the same key binding, causing auto-submit completions (like slash commands) to execute immediately upon selection with either key.
Solution Implemented:
Verification:
Fixes #2257