Skip to content

Commit a5d89d3

Browse files
Danilo Verde RibeiroDanilo Verde Ribeiro
authored andcommitted
Squashed commit of the following:
commit 3f13fe8a10c6f02e7cbcbbaf0b3c0eff403f9c4d Author: Danilo Verde Ribeiro <danrio@Danilos-MacBook-Pro.local> Date: Tue Oct 28 12:14:28 2025 -0300 Squashed commit of the following: commit 3dea370 Author: Francis Belanger <francis.belanger@gmail.com> Date: Tue Oct 28 08:49:27 2025 -0400 chore(emmyrc): fix broken .emmyrc.json commit c07f293 Author: Cameron Ring <cameron@cs.stanford.edu> Date: Mon Oct 27 17:32:50 2025 -0700 fix(renderer): render errors after last part commit bebe01c Author: Francis Belanger <francis.belanger@gmail.com> Date: Mon Oct 27 15:56:57 2025 -0400 feat(rendering): incremental rendering (sudo-tee#62) Introduces an incremental rendering that updates only the changed portion(s) of the buffer instead of re-rendering everything on every change. This reduces CPU usages for large sessions. This PR also incorporate a functional test suite in `tests/manual` where you can record a run snapshot tests. This is a major revision of the rendering system. Co-authored-by: Cameron Ring <cameron@cs.stanford.edu> commit a3e12fcf781471b2f2880118e94091183bd4cd85 Author: Danilo Verde Ribeiro <danrio@Danilos-MacBook-Pro.local> Date: Tue Oct 28 10:57:59 2025 -0300 feat(ui/context): enhance loading animation and context management commit a8382b83f1a76ec1e1e9a362f5eaa67071b53c70 Author: Danilo Verde Ribeiro <danrio@Danilos-MacBook-Pro.local> Date: Fri Oct 24 17:29:43 2025 -0300 Squashed commit of the following: commit 25c099d Merge: 7874524 23f384e Author: Danilo Verde Ribeiro <danrio@Danilos-MacBook-Pro.local> Date: Tue Oct 7 16:10:20 2025 -0300 Merge remote-tracking branch 'origin/main' commit 7874524 Author: Danilo Verde Ribeiro <danrio@Danilos-MacBook-Pro.local> Date: Fri Oct 3 11:43:15 2025 -0300 fix(git): missing files in context module commit 7d90008 Author: Danilo Verde Ribeiro <danrio@Danilos-MacBook-Pro.local> Date: Fri Oct 3 10:44:45 2025 -0300 feat(contex): better privacy and contextual awareness commit 9c65ef8 Author: Danilo Verde Ribeiro <danrio@Danilos-MacBook-Pro.local> Date: Thu Oct 2 19:56:19 2025 -0300 fix(hanging_close): clear all windows was hangin neovim commit ce8d473 Author: Danilo Verde Ribeiro <danrio@Danilos-MacBook-Pro.local> Date: Tue Oct 7 16:03:37 2025 -0300 fix(performace): proper detector and cleaner commit 3ab8e87 Author: Danilo Verde Ribeiro <danrio@Danilos-MacBook-Pro.local> Date: Thu Oct 2 17:39:42 2025 -0300 fix(autocmd): best to fetch context when user is idle commit d76b16c Author: Danilo Verde Ribeiro <danrio@Danilos-MacBook-Pro.local> Date: Thu Oct 2 20:42:41 2025 -0300 fix(type): rollback for better reading commit 850bdca Author: Danilo Verde Ribeiro <danrio@Danilos-MacBook-Pro.local> Date: Tue Oct 7 15:37:28 2025 -0300 refactor: clean up PR sudo-tee#42 based on maintainer feedback - Remove unnecessary inline type annotations in session_formatter.lua - Remove deprecated assistant_mode field from Message type - Simplify mode field documentation - Remove assistant_mode fallback logic in header formatting - Restore accidentally deleted keymap and context config fields - Fix indentation inconsistencies This addresses all review feedback from @sudo-tee while preserving the core feature: using CLI-persisted mode field to display agent names (BUILD, PLAN, etc.) in assistant message headers. commit 1573b3d Author: Danilo Verde Ribeiro <danrio@Danilos-MacBook-Pro.local> Date: Thu Oct 2 16:43:04 2025 -0300 fix(ui): use CLI-persisted mode field instead of client-side assistant_mode mutation - Read message.mode field from CLI-persisted JSON (already stored by opencode) - Remove client-side assistant_mode mutation in core.lua (lines 145-154) - Add message.mode to Message type definition, mark assistant_mode as deprecated - Update session_formatter to prefer message.mode over message.assistant_mode - Maintain backward compatibility with fallback chain: mode → assistant_mode → current_mode → ASSISTANT - Eliminates need for client-side mode persistence since CLI handles it commit 35eedbe Author: Danilo Verde Ribeiro <danrio@Danilos-MacBook-Pro.local> Date: Thu Oct 2 16:27:55 2025 -0300 fix: show current mode for latest assistant message when assistant_mode is missing Display-time fallback for the most recent assistant message to show the current mode name when assistant_mode field hasn't been stamped yet. This fixes new messages showing generic 'ASSISTANT' instead of the active mode label (e.g., 'NEOAGENT'). Historical messages remain unchanged, preserving their original mode labels or showing generic 'ASSISTANT' for old messages created before mode tracking was added. commit 9229b87 Author: Danilo Verde Ribeiro <danrio@Danilos-MacBook-Pro.local> Date: Tue Oct 7 14:30:56 2025 -0300 fix(ui): use CLI-persisted mode field instead of client-side assistant_mode mutation - Read message.mode field from CLI-persisted JSON (already stored by opencode) - Remove client-side assistant_mode mutation in core.lua (lines 145-154) - Add message.mode to Message type definition, mark assistant_mode as deprecated - Update session_formatter to prefer message.mode over message.assistant_mode - Maintain backward compatibility with fallback chain: mode → assistant_mode → current_mode → ASSISTANT - Eliminates need for client-side mode persistence since CLI handles it commit b99d997 Author: Danilo Verde Ribeiro <danrio@Danilos-MacBook-Pro.local> Date: Thu Oct 2 16:17:38 2025 -0300 fix(ui): remove assistant_mode backfill to preserve historical mode labels The backfill loop was seeding from state.current_mode and stamping all historical assistant messages without assistant_mode, causing every message to show the current mode's name on restart rather than the mode used at that point in time. Removed lines 35-46 (backfill loop). Historical messages without assistant_mode now display as generic 'ASSISTANT' via existing fallback logic in _format_message_header (lines 299-304). This preserves immutability of stored assistant_mode values and prevents cross-session pollution. commit 008d290 Author: Danilo Verde Ribeiro <danrio@Danilos-MacBook-Pro.local> Date: Thu Oct 2 15:39:47 2025 -0300 feat(context): add recent_buffers synthetic context (MRU buffers with optional symbols) commit 2231aeb Author: Danilo Verde Ribeiro <danrio@Danilos-MacBook-Pro.local> Date: Thu Oct 2 15:35:51 2025 -0300 feat(ui): stabilize assistant_mode labeling and improve session formatting robustness\n\n- Persist assistant_mode onto latest assistant message after run\n- Backfill assistant_mode for historical assistant messages for stable display names\n- Use assistant_mode (uppercase) in headers instead of generic ASSISTANT\n- Improve revert stats typing and snapshot action anchoring with display_line + range\n- Harden get_message_at_line nil checks to avoid indexing errors\n- Extend MessagePart.type to include patch and step-start; allow OutputExtmark function form\n- Add assistant_mode field to Message type\n- Fix synthetic user message check (part.synthetic ~= true)\n- Improve callout width handling when window invalid; fallback to config width or 80\n- Add type annotations for tool formatting inputs/metadata/output\n- Correct diff virt_text structure and highlight group names\n- General annotation cleanup and stability improvements commit 6f35278 Author: Danilo Verde Ribeiro <danrio@Danilos-MacBook-Pro.local> Date: Thu Oct 2 13:27:13 2025 -0300 fix: add caching to context.load(), debounce WinLeave autocmd, fix types for LSP commit 3047974 Author: Danilo Verde Ribeiro <danrio@Danilos-MacBook-Pro.local> Date: Thu Oct 2 12:50:11 2025 -0300 feat: enhance context with plugin versions and buffer symbols, update types and tests commit d7f1ead Author: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Date: Thu Oct 2 13:17:10 2025 +0000 Update README with enhanced context documentation Co-authored-by: DanRioDev <1839750+DanRioDev@users.noreply.github.com> commit 32819c0 Author: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Date: Thu Oct 2 13:14:30 2025 +0000 Add enhanced context gathering functions and tests Co-authored-by: DanRioDev <1839750+DanRioDev@users.noreply.github.com> commit f9f4f16 Author: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Date: Thu Oct 2 13:06:57 2025 +0000 Initial plan commit 23f384e Author: Danilo Verde Ribeiro <danrio@Danilos-MacBook-Pro.local> Date: Fri Oct 3 11:43:15 2025 -0300 fix(git): missing files in context module commit df83776 Author: Danilo Verde Ribeiro <danrio@Danilos-MacBook-Pro.local> Date: Fri Oct 3 10:44:45 2025 -0300 feat(contex): better privacy and contextual awareness commit f30c47a Merge: 34edf5d 0d102c0 Author: Danilo Verde Ribeiro <danrio@Danilos-MacBook-Pro.local> Date: Thu Oct 2 20:57:12 2025 -0300 Merge branch 'enhanced-context' commit 34edf5d Merge: 3e7a8a8 55cc0db Author: Danilo Verde Ribeiro <danrio@Danilos-MacBook-Pro.local> Date: Thu Oct 2 20:53:32 2025 -0300 Merge branch 'style-assistant-name-is-agent-name' commit 55cc0db Author: Danilo Verde Ribeiro <danrio@Danilos-MacBook-Pro.local> Date: Thu Oct 2 20:42:41 2025 -0300 fix(type): rollback for better reading commit f26b069 Author: Danilo Verde Ribeiro <danrio@Danilos-MacBook-Pro.local> Date: Thu Oct 2 20:28:51 2025 -0300 refactor: clean up PR sudo-tee#42 based on maintainer feedback - Remove unnecessary inline type annotations in session_formatter.lua - Remove deprecated assistant_mode field from Message type - Simplify mode field documentation - Remove assistant_mode fallback logic in header formatting - Restore accidentally deleted keymap and context config fields - Fix indentation inconsistencies This addresses all review feedback from @sudo-tee while preserving the core feature: using CLI-persisted mode field to display agent names (BUILD, PLAN, etc.) in assistant message headers. commit 0d102c0 Author: Danilo Verde Ribeiro <danrio@Danilos-MacBook-Pro.local> Date: Thu Oct 2 19:56:19 2025 -0300 fix(hanging_close): clear all windows was hangin neovim commit 1f8da59 Author: Danilo Verde Ribeiro <danrio@Danilos-MacBook-Pro.local> Date: Thu Oct 2 18:45:10 2025 -0300 fix(performace): proper detector and cleaner commit 8fd42b9 Author: Danilo Verde Ribeiro <danrio@Danilos-MacBook-Pro.local> Date: Thu Oct 2 17:39:42 2025 -0300 fix(autocmd): best to fetch context when user is idle commit c3f6e17 Author: Danilo Verde Ribeiro <danrio@Danilos-MacBook-Pro.local> Date: Thu Oct 2 17:35:21 2025 -0300 fix(clean_up): remove unwanted specify file commit 1ef95f5 Author: Danilo Verde Ribeiro <danrio@Danilos-MacBook-Pro.local> Date: Thu Oct 2 16:43:04 2025 -0300 fix(ui): use CLI-persisted mode field instead of client-side assistant_mode mutation - Read message.mode field from CLI-persisted JSON (already stored by opencode) - Remove client-side assistant_mode mutation in core.lua (lines 145-154) - Add message.mode to Message type definition, mark assistant_mode as deprecated - Update session_formatter to prefer message.mode over message.assistant_mode - Maintain backward compatibility with fallback chain: mode → assistant_mode → current_mode → ASSISTANT - Eliminates need for client-side mode persistence since CLI handles it commit c08f7e3 Author: Danilo Verde Ribeiro <danrio@Danilos-MacBook-Pro.local> Date: Thu Oct 2 16:27:55 2025 -0300 fix: show current mode for latest assistant message when assistant_mode is missing Display-time fallback for the most recent assistant message to show the current mode name when assistant_mode field hasn't been stamped yet. This fixes new messages showing generic 'ASSISTANT' instead of the active mode label (e.g., 'NEOAGENT'). Historical messages remain unchanged, preserving their original mode labels or showing generic 'ASSISTANT' for old messages created before mode tracking was added. commit 80279eb Author: Danilo Verde Ribeiro <danrio@Danilos-MacBook-Pro.local> Date: Thu Oct 2 16:17:38 2025 -0300 fix(ui): remove assistant_mode backfill to preserve historical mode labels The backfill loop was seeding from state.current_mode and stamping all historical assistant messages without assistant_mode, causing every message to show the current mode's name on restart rather than the mode used at that point in time. Removed lines 35-46 (backfill loop). Historical messages without assistant_mode now display as generic 'ASSISTANT' via existing fallback logic in _format_message_header (lines 299-304). This preserves immutability of stored assistant_mode values and prevents cross-session pollution. commit 3e7a8a8 Merge: 2b691a6 be7c6a6 Author: Danilo Verde Ribeiro <danrio@Danilos-MacBook-Pro.local> Date: Thu Oct 2 17:06:17 2025 -0300 Merge branch 'style-assistant-name-is-agent-name' commit be7c6a6 Author: Danilo Verde Ribeiro <danrio@Danilos-MacBook-Pro.local> Date: Thu Oct 2 16:43:04 2025 -0300 fix(ui): use CLI-persisted mode field instead of client-side assistant_mode mutation - Read message.mode field from CLI-persisted JSON (already stored by opencode) - Remove client-side assistant_mode mutation in core.lua (lines 145-154) - Add message.mode to Message type definition, mark assistant_mode as deprecated - Update session_formatter to prefer message.mode over message.assistant_mode - Maintain backward compatibility with fallback chain: mode → assistant_mode → current_mode → ASSISTANT - Eliminates need for client-side mode persistence since CLI handles it commit 82cf73e Author: Danilo Verde Ribeiro <danrio@Danilos-MacBook-Pro.local> Date: Thu Oct 2 16:27:55 2025 -0300 fix: show current mode for latest assistant message when assistant_mode is missing Display-time fallback for the most recent assistant message to show the current mode name when assistant_mode field hasn't been stamped yet. This fixes new messages showing generic 'ASSISTANT' instead of the active mode label (e.g., 'NEOAGENT'). Historical messages remain unchanged, preserving their original mode labels or showing generic 'ASSISTANT' for old messages created before mode tracking was added. commit db5ab7b Author: Danilo Verde Ribeiro <danrio@Danilos-MacBook-Pro.local> Date: Thu Oct 2 16:17:38 2025 -0300 fix(ui): remove assistant_mode backfill to preserve historical mode labels The backfill loop was seeding from state.current_mode and stamping all historical assistant messages without assistant_mode, causing every message to show the current mode's name on restart rather than the mode used at that point in time. Removed lines 35-46 (backfill loop). Historical messages without assistant_mode now display as generic 'ASSISTANT' via existing fallback logic in _format_message_header (lines 299-304). This preserves immutability of stored assistant_mode values and prevents cross-session pollution. commit 9a59aaf Author: Danilo Verde Ribeiro <danrio@Danilos-MacBook-Pro.local> Date: Thu Oct 2 15:39:47 2025 -0300 feat(context): add recent_buffers synthetic context (MRU buffers with optional symbols) commit cf1c5fd Author: Danilo Verde Ribeiro <danrio@Danilos-MacBook-Pro.local> Date: Thu Oct 2 15:35:51 2025 -0300 feat(ui): stabilize assistant_mode labeling and improve session formatting robustness\n\n- Persist assistant_mode onto latest assistant message after run\n- Backfill assistant_mode for historical assistant messages for stable display names\n- Use assistant_mode (uppercase) in headers instead of generic ASSISTANT\n- Improve revert stats typing and snapshot action anchoring with display_line + range\n- Harden get_message_at_line nil checks to avoid indexing errors\n- Extend MessagePart.type to include patch and step-start; allow OutputExtmark function form\n- Add assistant_mode field to Message type\n- Fix synthetic user message check (part.synthetic ~= true)\n- Improve callout width handling when window invalid; fallback to config width or 80\n- Add type annotations for tool formatting inputs/metadata/output\n- Correct diff virt_text structure and highlight group names\n- General annotation cleanup and stability improvements commit 2b691a6 Author: Danilo Verde Ribeiro <danrio@Danilos-MacBook-Pro.local> Date: Thu Oct 2 13:27:13 2025 -0300 fix: add caching to context.load(), debounce WinLeave autocmd, fix types for LSP commit 9e8ebb5 Author: Danilo Verde Ribeiro <danrio@Danilos-MacBook-Pro.local> Date: Thu Oct 2 12:50:11 2025 -0300 feat: enhance context with plugin versions and buffer symbols, update types and tests commit 29cfaf2 Author: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Date: Thu Oct 2 13:17:10 2025 +0000 Update README with enhanced context documentation Co-authored-by: DanRioDev <1839750+DanRioDev@users.noreply.github.com> commit 0e01ac7 Author: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Date: Thu Oct 2 13:14:30 2025 +0000 Add enhanced context gathering functions and tests Co-authored-by: DanRioDev <1839750+DanRioDev@users.noreply.github.com> commit 8d28ff2 Author: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Date: Thu Oct 2 13:06:57 2025 +0000 Initial plan commit 75504e9 Author: Danilo Verde Ribeiro <danrio@Danilos-MacBook-Pro.local> Date: Thu Oct 9 19:10:31 2025 -0300 fix(base_url): race condition commit e0506af Author: Danilo Verde Ribeiro <danrio@Danilos-MacBook-Pro.local> Date: Thu Oct 2 16:27:55 2025 -0300 fix: show current mode for latest assistant message when assistant_mode is missing Display-time fallback for the most recent assistant message to show the current mode name when assistant_mode field hasn't been stamped yet. This fixes new messages showing generic 'ASSISTANT' instead of the active mode label (e.g., 'NEOAGENT'). Historical messages remain unchanged, preserving their original mode labels or showing generic 'ASSISTANT' for old messages created before mode tracking was added. commit 5cc8c74 Author: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Date: Thu Oct 2 13:06:57 2025 +0000 Initial plan commit 52c66e5 Author: Danilo Verde Ribeiro <danrio@Danilos-MacBook-Pro.local> Date: Thu Oct 2 17:39:42 2025 -0300 fix(autocmd): best to fetch context when user is idle commit 3c04ded Author: Danilo Verde Ribeiro <danrio@Danilos-MacBook-Pro.local> Date: Thu Oct 2 20:42:41 2025 -0300 fix(type): rollback for better reading commit 93d880a Author: Danilo Verde Ribeiro <danrio@Danilos-MacBook-Pro.local> Date: Tue Oct 7 15:37:28 2025 -0300 refactor: clean up PR sudo-tee#42 based on maintainer feedback - Remove unnecessary inline type annotations in session_formatter.lua - Remove deprecated assistant_mode field from Message type - Simplify mode field documentation - Remove assistant_mode fallback logic in header formatting - Restore accidentally deleted keymap and context config fields - Fix indentation inconsistencies This addresses all review feedback from @sudo-tee while preserving the core feature: using CLI-persisted mode field to display agent names (BUILD, PLAN, etc.) in assistant message headers. commit f8c504f Author: Danilo Verde Ribeiro <danrio@Danilos-MacBook-Pro.local> Date: Thu Oct 2 16:43:04 2025 -0300 fix(ui): use CLI-persisted mode field instead of client-side assistant_mode mutation - Read message.mode field from CLI-persisted JSON (already stored by opencode) - Remove client-side assistant_mode mutation in core.lua (lines 145-154) - Add message.mode to Message type definition, mark assistant_mode as deprecated - Update session_formatter to prefer message.mode over message.assistant_mode - Maintain backward compatibility with fallback chain: mode → assistant_mode → current_mode → ASSISTANT - Eliminates need for client-side mode persistence since CLI handles it commit 142f0ed Author: Danilo Verde Ribeiro <danrio@Danilos-MacBook-Pro.local> Date: Thu Oct 2 16:27:55 2025 -0300 fix: show current mode for latest assistant message when assistant_mode is missing Display-time fallback for the most recent assistant message to show the current mode name when assistant_mode field hasn't been stamped yet. This fixes new messages showing generic 'ASSISTANT' instead of the active mode label (e.g., 'NEOAGENT'). Historical messages remain unchanged, preserving their original mode labels or showing generic 'ASSISTANT' for old messages created before mode tracking was added. commit 8251287 Author: Danilo Verde Ribeiro <danrio@Danilos-MacBook-Pro.local> Date: Tue Oct 7 14:30:56 2025 -0300 fix(ui): use CLI-persisted mode field instead of client-side assistant_mode mutation - Read message.mode field from CLI-persisted JSON (already stored by opencode) - Remove client-side assistant_mode mutation in core.lua (lines 145-154) - Add message.mode to Message type definition, mark assistant_mode as deprecated - Update session_formatter to prefer message.mode over message.assistant_mode - Maintain backward compatibility with fallback chain: mode → assistant_mode → current_mode → ASSISTANT - Eliminates need for client-side mode persistence since CLI handles it commit fbb30fc Author: Danilo Verde Ribeiro <danrio@Danilos-MacBook-Pro.local> Date: Thu Oct 2 16:17:38 2025 -0300 fix(ui): remove assistant_mode backfill to preserve historical mode labels The backfill loop was seeding from state.current_mode and stamping all historical assistant messages without assistant_mode, causing every message to show the current mode's name on restart rather than the mode used at that point in time. Removed lines 35-46 (backfill loop). Historical messages without assistant_mode now display as generic 'ASSISTANT' via existing fallback logic in _format_message_header (lines 299-304). This preserves immutability of stored assistant_mode values and prevents cross-session pollution. commit 8968117 Author: Danilo Verde Ribeiro <danrio@Danilos-MacBook-Pro.local> Date: Thu Oct 2 15:39:47 2025 -0300 feat(context): add recent_buffers synthetic context (MRU buffers with optional symbols) commit e6e8948 Author: Danilo Verde Ribeiro <danrio@Danilos-MacBook-Pro.local> Date: Thu Oct 2 15:35:51 2025 -0300 feat(ui): stabilize assistant_mode labeling and improve session formatting robustness\n\n- Persist assistant_mode onto latest assistant message after run\n- Backfill assistant_mode for historical assistant messages for stable display names\n- Use assistant_mode (uppercase) in headers instead of generic ASSISTANT\n- Improve revert stats typing and snapshot action anchoring with display_line + range\n- Harden get_message_at_line nil checks to avoid indexing errors\n- Extend MessagePart.type to include patch and step-start; allow OutputExtmark function form\n- Add assistant_mode field to Message type\n- Fix synthetic user message check (part.synthetic ~= true)\n- Improve callout width handling when window invalid; fallback to config width or 80\n- Add type annotations for tool formatting inputs/metadata/output\n- Correct diff virt_text structure and highlight group names\n- General annotation cleanup and stability improvements commit 2d2cb6a Author: Danilo Verde Ribeiro <danrio@Danilos-MacBook-Pro.local> Date: Thu Oct 2 13:27:13 2025 -0300 fix: add caching to context.load(), debounce WinLeave autocmd, fix types for LSP commit 888214d Author: Danilo Verde Ribeiro <danrio@Danilos-MacBook-Pro.local> Date: Thu Oct 2 12:50:11 2025 -0300 feat: enhance context with plugin versions and buffer symbols, update types and tests commit 0c71b6c Author: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Date: Thu Oct 2 13:17:10 2025 +0000 Update README with enhanced context documentation Co-authored-by: DanRioDev <1839750+DanRioDev@users.noreply.github.com> commit bcbe451 Author: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Date: Thu Oct 2 13:14:30 2025 +0000 Add enhanced context gathering functions and tests Co-authored-by: DanRioDev <1839750+DanRioDev@users.noreply.github.com> commit 04403d9 Author: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Date: Thu Oct 2 13:06:57 2025 +0000 Initial plan commit 0f2d1e5 Author: Francis Belanger <francis.belanger@gmail.com> Date: Thu Oct 23 07:32:58 2025 -0400 feat(blink): enable other completion sources for blink This should fix sudo-tee#65 commit e06f651 Author: Francis Belanger <francis.belanger@gmail.com> Date: Thu Oct 23 07:31:11 2025 -0400 fix(cmp): fix file mention closing when typing for nvim_cmp commit 84d9ae0 Author: Francis Belanger <francis.belanger@gmail.com> Date: Thu Oct 23 06:32:17 2025 -0400 fix(mentions): letter `a` appended when triggering mentions commit 44d22ba Author: Francis Belanger <francis.belanger@gmail.com> Date: Thu Oct 23 06:23:49 2025 -0400 test(toggle): fix tests for api.open commit 826341d Author: Francis Belanger <francis.belanger@gmail.com> Date: Thu Oct 23 06:18:09 2025 -0400 fix(toggle): toggle keymap was always triggering insert mode This should fix sudo-tee#77 commit 803eb3e Author: Francis Belanger <francis.belanger@gmail.com> Date: Wed Oct 22 15:53:52 2025 -0400 docs(session_picker): add config for delete session in README commit edba833 Author: Francis Belanger <francis.belanger@gmail.com> Date: Wed Oct 22 15:50:21 2025 -0400 feat(session_picker): add keybind in title commit 357ef3c Author: Cameron Ring <cameron@cs.stanford.edu> Date: Fri Oct 17 18:37:41 2025 -0700 feat(session_picker): Fixes sudo-tee#68 commit fed6941 Author: Francis Belanger <francis.belanger@gmail.com> Date: Mon Oct 20 15:19:21 2025 -0400 fix(completion): completion were broken after last change commit c505554 Author: Francis Belanger <francis.belanger@gmail.com> Date: Mon Oct 20 14:53:50 2025 -0400 fix(focus_input): fix focusing input on window opening commit 4824151 Author: Francis Belanger <francis.belanger@gmail.com> Date: Mon Oct 20 14:37:36 2025 -0400 fix(input_window): properly restore input text when reopening the window commit ca62c0c Author: Francis Belanger <francis.belanger@gmail.com> Date: Mon Oct 20 14:24:17 2025 -0400 fix(bash-tool): properly shown bash command on permission prompt This should fix sudo-tee#74 commit 28d6379 Author: Francis Belanger <francis.belanger@gmail.com> Date: Mon Oct 20 14:08:45 2025 -0400 fix: focusing input window in insert mode The shortcut <C-i> is interpreted as <tab> by terminals I moved it to i. sudo-tee#72 focusing the input_window should restore to the previous position not the char before sudo-tee#64 commit 946af3a Author: Francis Belanger <francis.belanger@gmail.com> Date: Sat Oct 18 15:11:17 2025 -0400 fix(slash_commands): allow slash_commands to be entered in input window This should fix sudo-tee#71 commit abc1e2a Author: Francis Belanger <francis.belanger@gmail.com> Date: Sat Oct 18 11:25:55 2025 -0400 feat(completion): add folder icon kind commit 031bf0a Author: Francis Belanger <francis.belanger@gmail.com> Date: Sat Oct 18 11:12:19 2025 -0400 feat: support for folder mentions commit e99a463 Author: Francis Belanger <francis.belanger@gmail.com> Date: Thu Oct 16 16:34:41 2025 -0400 feat(completion): add file search from server api commit 601cc82 Author: Cameron Ring <cameron@cs.stanford.edu> Date: Thu Oct 9 15:52:47 2025 -0700 fix(config): add config metatable (sudo-tee#59) Fixes sudo-tee#58 Makes config access less error prone and more ergonomic
1 parent 68e0756 commit a5d89d3

File tree

109 files changed

+63858
-926
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

109 files changed

+63858
-926
lines changed

.emmyrc.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"$schema": "https://raw.githubusercontent.com/EmmyLuaLs/emmylua-analyzer-rust/refs/heads/main/crates/emmylua_code_analysis/resources/schema.json",
3+
"runtime": {
4+
"version": "LuaJIT"
5+
},
6+
"workspace": {
7+
"library": [
8+
"$VIMRUNTIME",
9+
"$HOME/.local/share/nvim/lazy/luvit-meta/library/uv.lua"
10+
],
11+
"ignoreGlobs": [
12+
"**/*_spec.lua"
13+
]
14+
}
15+
}

.github/workflows/tests.yml

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
# From
2+
# https://github.com/shortcuts/neovim-plugin-boilerplate/blob/main/.github/workflows/main.yml
3+
4+
name: tests
5+
6+
on:
7+
push:
8+
pull_request:
9+
types: [opened, synchronize]
10+
11+
jobs:
12+
lint:
13+
runs-on: ubuntu-latest
14+
name: lint
15+
steps:
16+
- uses: actions/checkout@v4
17+
18+
- uses: JohnnyMorganz/stylua-action@v4
19+
with:
20+
token: ${{ secrets.GITHUB_TOKEN }}
21+
version: latest
22+
args: --check . -g '*.lua' -g '!deps/'
23+
24+
test:
25+
timeout-minutes: 4
26+
strategy:
27+
matrix:
28+
os: [ubuntu-latest]
29+
neovim_version: ["v0.10.3", "v0.11.4", "nightly"]
30+
include:
31+
- os: macos-latest
32+
neovim_version: v0.11.4
33+
runs-on: ${{ matrix.os }}
34+
35+
steps:
36+
- uses: actions/checkout@v4
37+
38+
- name: setup neovim
39+
uses: rhysd/action-setup-vim@v1
40+
with:
41+
neovim: true
42+
version: ${{ matrix.neovim_version }}
43+
44+
# only needed if testing in ssh but doesn't hurt
45+
- name: Add nvim to PATH
46+
run: echo "${{ steps.setup_nvim.outputs.executable }}" >> $GITHUB_PATH
47+
48+
- name: Install plenary
49+
run: |
50+
git clone --depth 1 https://github.com/nvim-lua/plenary.nvim ~/.local/share/nvim/site/pack/vendor/start/plenary.nvim
51+
52+
- name: Run tests
53+
run: ./run_tests.sh
54+
55+
# # For sshing in to debug GH actions
56+
# - name: Setup tmate session
57+
# uses: mxschmitt/action-tmate@v3
58+
# with:
59+
# detached: true

.luarc.json

Lines changed: 0 additions & 20 deletions
This file was deleted.

AGENTS.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,24 @@
11
# AGENTS.md
22

33
## Build, Lint, and Test
4+
45
- **Run all tests:** `./run_tests.sh`
56
- **Minimal tests:**
67
`nvim --headless -u tests/minimal/init.lua -c "lua require('plenary.test_harness').test_directory('./tests/minimal', {minimal_init = './tests/minimal/init.lua', sequential = true})"`
78
- **Unit tests:**
89
`nvim --headless -u tests/minimal/init.lua -c "lua require('plenary.test_harness').test_directory('./tests/unit', {minimal_init = './tests/minimal/init.lua'})"`
910
- **Run a single test:** Replace the directory in the above command with the test file path, e.g.:
10-
`nvim --headless -u tests/minimal/init.lua -c "lua require('plenary.test_harness').test_directory('./tests/unit/job_spec.lua', {minimal_init = './tests/minimal/init.lua'})"`
11+
`nvim --headless -u tests/manual/init.lua -c "lua require('plenary.test_harness').test_directory('./tests/unit/job_spec.lua', {minimal_init = './tests/minimal/init.lua'})"`
12+
- **Manual/Visual tests:** `./tests/manual/run_replay.sh` - Replay captured event data for visual testing
13+
- **Debug rendering in headless mode:**
14+
`nvim --headless -u tests/manual/init_replay.lua "+ReplayHeadless" "+ReplayLoad tests/data/FILE.json" "+ReplayAll 0" "+qa"`
15+
This will replay events and dump the output buffer to stdout, useful for debugging rendering issues without a UI.
16+
You can also run to just a specific message # with (e.g. message # 12):
17+
`nvim --headless -u tests/manual/init_replay.lua "+ReplayHeadless" "+ReplayLoad tests/data/message-removal.json" "+ReplayNext 12" "+qa"`
1118
- **Lint:** No explicit lint command; follow Lua best practices.
1219

1320
## Code Style Guidelines
21+
1422
- **Imports:** `local mod = require('mod')` at the top. Group standard, then project imports.
1523
- **Formatting:** 2 spaces per indent. No trailing whitespace. Lines ≤ 100 chars.
1624
- **Types:** Use Lua annotations (`---@class`, `---@field`, etc.) for public APIs/config.
@@ -19,6 +27,6 @@
1927
- **Comments:** Only when necessary for clarity. Prefer self-explanatory code.
2028
- **Functions:** Prefer local functions. Use `M.func` for module exports.
2129
- **Config:** Centralize in `config.lua`. Use deep merge for user overrides.
22-
- **Tests:** Place in `tests/minimal/` or `tests/unit/`.
30+
- **Tests:** Place in `tests/minimal/` or `tests/unit/`. Manual/visual tests in `tests/manual/`.
2331

2432
_Agentic coding agents must follow these conventions strictly for consistency and reliability._

README.md

Lines changed: 87 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ require('opencode').setup({
169169
[']]'] = { 'next_message' }, -- Navigate to next message in the conversation
170170
['[['] = { 'prev_message' }, -- Navigate to previous message in the conversation
171171
['<tab>'] = { 'toggle_pane', mode = { 'n', 'i' } }, -- Toggle between input and output panes
172-
['<C-i>'] = { 'focus_input' }, -- Focus on input window and enter insert mode at the end of the input from the output window
172+
['i'] = { 'focus_input', 'n' }, -- Focus on input window and enter insert mode at the end of the input from the output window
173173
['<leader>oS'] = { 'select_child_session' }, -- Select and load a child session
174174
['<leader>oD'] = { 'debug_message' }, -- Open raw message in new buffer for debugging
175175
['<leader>oO'] = { 'debug_output' }, -- Open raw output in new buffer for debugging
@@ -202,6 +202,9 @@ require('opencode').setup({
202202
permission_deny = 'd',-- Accept permission request once (only available when there is a pending permission request)
203203
debug_session = '<leader>ods', -- Debug session info
204204
},
205+
session_picker = {
206+
delete_session = { '<C-d>' }, -- Delete selected session in the session picker
207+
},
205208
},
206209
ui = {
207210
position = 'right', -- 'right' (default) or 'left'. Position of the UI split
@@ -220,6 +223,10 @@ require('opencode').setup({
220223
tools = {
221224
show_output = true, -- Show tools output [diffs, cmd output, etc.] (default: true)
222225
},
226+
rendering = {
227+
markdown_debounce_ms = 250, -- Debounce time for markdown rendering on new data (default: 250ms)
228+
on_data_rendered = nil, -- Called when new data is rendered; set to false to disable default RenderMarkdown/Markview behavior
229+
},
223230
},
224231
input = {
225232
text = {
@@ -230,7 +237,7 @@ require('opencode').setup({
230237
file_sources = {
231238
cache_timeout = 300, -- seconds
232239
enabled = true,
233-
preferred_cli_tool = 'fd', -- 'fd','fdfind','rg','git' if nil, it will use the best available tool
240+
preferred_cli_tool = 'server', -- 'fd','fdfind','rg','git','server' if nil, it will use the best available tool, 'server' uses opencode cli to get file list (works cross platform) and supports folders
234241
ignore_patterns = {
235242
'^%.git/',
236243
'^%.svn/',
@@ -287,76 +294,75 @@ require('opencode').setup({
287294
selection = {
288295
enabled = true, -- Include selected text in the context
289296
},
290-
-- Enhanced context options (enabled by default where applicable)
297+
-- Enhanced context options (all disabled by default)
291298
marks = {
292-
enabled = true, -- Include the most recently accessed marks
293-
limit = 5,
299+
enabled = false, -- Include the 10 most recently accessed marks
300+
limit = 10,
294301
},
295302
jumplist = {
296-
enabled = true, -- Include the last jumps
297-
limit = 5,
303+
enabled = false, -- Include the last 10 jumps
304+
limit = 10,
298305
},
299306
recent_buffers = {
300-
enabled = true, -- Include the most recently accessed buffers
301-
symbols_only = true, -- Include only buffers with symbols (functions, classes, etc.)
302-
limit = 3,
307+
enabled = false, -- Include the 10 most recently accessed buffers
308+
limit = 10,
303309
},
304310
undo_history = {
305-
enabled = true, -- Include the last undo branches/changesets
306-
limit = 3,
311+
enabled = false, -- Include the last 10 undo branches/changesets
312+
limit = 10,
307313
},
308314
windows_tabs = {
309-
enabled = true, -- Include active windows and tabs information
315+
enabled = false, -- Include active windows and tabs information
310316
},
311317
highlights = {
312-
enabled = true, -- Include buffer line highlights in current viewport
318+
enabled = false, -- Include buffer line highlights in current viewport
313319
},
314320
session_info = {
315321
enabled = false, -- Include current session name if active
316322
},
317323
registers = {
318-
enabled = true, -- Include contents of specified registers
319-
include = { '"', '/', 'q', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '%', '#', '.' }, -- Registers to include
324+
enabled = false, -- Include contents of specified registers
325+
include = { '"', '/', 'q' }, -- Registers to include
320326
},
321327
command_history = {
322-
enabled = true, -- Include the last executed commands
323-
limit = 3,
328+
enabled = false, -- Include the last 5 executed commands
329+
limit = 5,
324330
},
325331
search_history = {
326-
enabled = true, -- Include the last search patterns
327-
limit = 3,
332+
enabled = false, -- Include the last 5 search patterns
333+
limit = 5,
328334
},
329335
debug_data = {
330-
enabled = true, -- Include active nvim-dap debugging sessions and breakpoints
336+
enabled = false, -- Include active nvim-dap debugging sessions and breakpoints
331337
},
332338
lsp_context = {
333339
enabled = false, -- Include LSP diagnostics and code actions
334340
diagnostics_limit = 10, -- Max diagnostics to include
335341
code_actions = false, -- Include available code actions at cursor
336342
},
337343
git_info = {
338-
enabled = true, -- Include git branch, file diff, and recent changes
344+
enabled = false, -- Include git branch, file diff, and recent changes
339345
diff_limit = 10, -- Max lines of file diff to include
340346
changes_limit = 5, -- Number of recent commits to include
341347
},
342348
fold_info = {
343-
enabled = true, -- Include visible fold information in viewport
349+
enabled = false, -- Include visible fold information in viewport
344350
},
345351
cursor_surrounding = {
346-
enabled = true, -- Include lines around cursor position
347-
lines_above = 4, -- Lines to include above cursor
348-
lines_below = 4, -- Lines to include below cursor
352+
enabled = false, -- Include lines around cursor position
353+
lines_above = 3, -- Lines to include above cursor
354+
lines_below = 3, -- Lines to include below cursor
349355
},
350356
quickfix_loclist = {
351-
enabled = true, -- Include quickfix and location list entries
357+
enabled = false, -- Include quickfix and location list entries
352358
limit = 5,
353359
},
354360
macros = {
355361
enabled = false, -- Include recorded macro content
356362
register = 'q', -- Macro register to include
357363
},
358364
terminal_buffers = {
359-
enabled = true, -- Include most recently used terminal buffer details
365+
enabled = false, -- Include most recently used terminal buffer details
360366
},
361367
session_duration = {
362368
enabled = false, -- Include time spent in current Neovim session
@@ -535,6 +541,58 @@ The following editor context is automatically captured and included in your conv
535541

536542
### Core Context (Enabled by Default)
537543

544+
| Context Type | Description | Configuration Key |
545+
| --------------- | ---------------------------------------------------- | ------------------------ |
546+
| Current file | Path to the focused file before entering opencode | `current_file.enabled` |
547+
| Selected text | Text and lines currently selected in visual mode | `selection.enabled` |
548+
| Mentioned files | File info added through [mentions](#file-mentions) | N/A (always available) |
549+
| Diagnostics | Diagnostics from the current file (if any) | `diagnostics` |
550+
| Cursor position | Current cursor position and line content in the file | `cursor_data.enabled` |
551+
552+
### Enhanced Context (Disabled by Default)
553+
554+
These additional context types can be enabled to provide even more information to the AI:
555+
556+
| Context Type | Description | Configuration Key |
557+
| ------------------ | ---------------------------------------------------------- | -------------------------- |
558+
| Marks | 10 most recently accessed marks | `marks.enabled` |
559+
| Jumplist | Last 10 jumps in the jump list | `jumplist.enabled` |
560+
| Recent Buffers | 10 most recently accessed buffers | `recent_buffers.enabled` |
561+
| Undo History | Last 10 undo branches or changesets | `undo_history.enabled` |
562+
| Windows & Tabs | Information about active windows and tabs | `windows_tabs.enabled` |
563+
| Highlights | Buffer line highlights in current viewport | `highlights.enabled` |
564+
| Session Info | Current Neovim session name if active | `session_info.enabled` |
565+
| Registers | Contents of specified registers (e.g., `"`, `/`, `q`) | `registers.enabled` |
566+
| Command History | Last 5 executed Vim commands | `command_history.enabled` |
567+
| Search History | Last 5 search patterns | `search_history.enabled` |
568+
| Debug Data | Active nvim-dap debugging sessions and breakpoints | `debug_data.enabled` |
569+
| LSP Context | LSP diagnostics and available code actions | `lsp_context.enabled` |
570+
| Git Info | Current branch, file diff, and recent commits | `git_info.enabled` |
571+
| Fold Info | Visible folds in current viewport | `fold_info.enabled` |
572+
| Cursor Surrounding | Lines above and below cursor position | `cursor_surrounding.enabled`|
573+
| Quickfix/Loclist | Quickfix and location list entries | `quickfix_loclist.enabled` |
574+
| Macros | Recorded macro content from specified register | `macros.enabled` |
575+
| Terminal Buffers | Most recently used terminal buffer details | `terminal_buffers.enabled` |
576+
| Session Duration | Time spent in current Neovim session | `session_duration.enabled` |
577+
578+
To enable any of these enhanced context types, add them to your configuration:
579+
580+
```lua
581+
require('opencode').setup({
582+
context = {
583+
-- Enable specific enhanced context types
584+
marks = { enabled = true, limit = 10 },
585+
jumplist = { enabled = true, limit = 10 },
586+
git_info = { enabled = true, diff_limit = 10, changes_limit = 5 },
587+
lsp_context = { enabled = true, diagnostics_limit = 10, code_actions = true },
588+
cursor_surrounding = { enabled = true, lines_above = 3, lines_below = 3 },
589+
-- ... enable others as needed
590+
},
591+
})
592+
```
593+
594+
### Core Context (Enabled by Default)
595+
538596
| Context Type | Description | Configuration Key |
539597
| --------------- | ---------------------------------------------------- | ---------------------- |
540598
| Current file | Path to the focused file before entering opencode | `current_file.enabled` |
@@ -704,7 +762,7 @@ The plugin defines several highlight groups that can be customized to match your
704762
- `OpencodeAgentBuild`: Agent indicator in winbar for Build mode (default: #616161 background)
705763
- `OpencodeAgentCustom`: Agent indicator in winbar for custom modes (default: #3b4261 background)
706764
- `OpencodeContestualAction`: Highlight for contextual actions in the output window (default: #3b4261 background)
707-
- `OpencodeInpuutLegend`: Highlight for input window legend (default: #CCCCCC background)
765+
- `OpencodeInputLegend`: Highlight for input window legend (default: #CCCCCC background)
708766
- `OpencodeHint`: Highlight for hinting messages in input window and token info in output window footer (linked to `Comment`)
709767

710768
## 🔧 Setting up Opencode

0 commit comments

Comments
 (0)