refactor: fix reliability bugs and reduce code duplication - #59
Open
CoderCookE wants to merge 1 commit into
Open
refactor: fix reliability bugs and reduce code duplication#59CoderCookE wants to merge 1 commit into
CoderCookE wants to merge 1 commit into
Conversation
CoderCookE
commented
Sep 2, 2026
Owner
- Fix VimScript injection: display content now passed via vim.vars instead of string-formatted into vim.command, preventing crashes on backslashes
- Fix broken :GptBe persona command: was setting g:chat_persona which Python never read; now correctly sets g:llm_agent_persona
- Fix Anthropic URL construction: use urlparse to handle bare domains, /v1 paths, and full /v1/messages URLs without double-appending
- Fix save_plan() bypassing get_config(): now respects g:llm_agent_session_mode
- Fix window focus hijack: display_response() now restores original window after scrolling the chat buffer
- Fix path prefix guard in context.vim: replace length comparison with stridx() to avoid incorrectly skipping short paths like /srv or /app
- Remove ~20 lines of unreachable dead code after unconditional break
- Extract append_tool_results() shared helper to utils.py, eliminating duplicate tool-loop logic and dead format-detection branch in context.py
- Centralize Python sys.path setup into chatgpt#ensure_python_path(), removing 8 copy-pasted heredoc blocks across autoload files
- Fix conftest history fixture to use real \x01 delimiters
- Relax tool count assertion to >= 17
- Correct README default for summary_compaction_size (50KB -> 75KB)
- Fix VimScript injection: display content now passed via vim.vars instead of string-formatted into vim.command, preventing crashes on backslashes - Fix broken :GptBe persona command: was setting g:chat_persona which Python never read; now correctly sets g:llm_agent_persona - Fix Anthropic URL construction: use urlparse to handle bare domains, /v1 paths, and full /v1/messages URLs without double-appending - Fix save_plan() bypassing get_config(): now respects g:llm_agent_session_mode - Fix window focus hijack: display_response() now restores original window after scrolling the chat buffer - Fix path prefix guard in context.vim: replace length comparison with stridx() to avoid incorrectly skipping short paths like /srv or /app - Remove ~20 lines of unreachable dead code after unconditional break - Extract append_tool_results() shared helper to utils.py, eliminating duplicate tool-loop logic and dead format-detection branch in context.py - Centralize Python sys.path setup into chatgpt#ensure_python_path(), removing 8 copy-pasted heredoc blocks across autoload files - Fix conftest history fixture to use real \x01 delimiters - Relax tool count assertion to >= 17 - Correct README default for summary_compaction_size (50KB -> 75KB) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.