Commit c5653ca
Squashed commit of the following:
commit 7653234
Author: Guillaume BOEHM <github@mail.gboehm.com>
Date: Wed Oct 29 10:27:47 2025 +0000
feat: add prompt_guard callback mechanism (sudo-tee#78)
This PR adds a plugin option to run a callback before sending promts to the LLM or before opening the opencode window.
In my use case I want to be able to exclude some directories of my computer with sensitive information in order to not mistakenly send them to the LLM.
I've mostly vibe-coded this and then went back on the code to check what it did, I'm not super well versed in lua so I might have missed things.
Implementation details:
Add prompt_guard configuration option (function that returns boolean)
Check guard before sending prompts (ERROR notification if denied)
Check guard before opening buffer first time (WARN notification if denied)
Add util.check_prompt_allowed() helper functions
Guard has no parameters, users can access vim state directly
Proper error handling for guard callback failures
Co-authored-by: Guillaume BOEHM <git@mail.gboehm.com>
commit 0dc254b
Author: Francis Belanger <francis.belanger@gmail.com>
Date: Tue Oct 28 12:01:42 2025 -0400
fix(run): context args not passed in run new session
commit 6eb7354
Author: Francis Belanger <francis.belanger@gmail.com>
Date: Tue Oct 28 11:18:48 2025 -0400
chore(icons): deprecate emoji icons in favor of nerdfonts
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 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
commit ca0ff90
Author: Francis Belanger <francis.belanger@gmail.com>
Date: Thu Oct 9 09:50:28 2025 -0400
chore: update .luarc.json for better support of emmylua_ls
commit a82b08c
Author: Francis Belanger <francis.belanger@gmail.com>
Date: Thu Oct 9 09:49:28 2025 -0400
fix: prefix replacement not working properly
commit 9d949e7
Author: Francis Belanger <francis.belanger@gmail.com>
Date: Thu Oct 9 08:43:57 2025 -0400
feat: add a keymap_prefix to configure the default `<leader>o`
commit 8c65d9b
Author: Cameron Ring <cameron@cs.stanford.edu>
Date: Thu Oct 9 03:29:02 2025 -0700
feat(config)!: modern keymap format + mode support (sudo-tee#52)
This is a complete overhaul of the keymaps,
The old config should still work but with a warning for migration
The new format shoud now be:
```lua
keymap = {
editor = {
['<leader>og'] = { 'toggle' }, -- I don't think we really need to support just string, it makes things more complex for nothing
['<leader>oi'] = { 'open_input' },
['<leader>oI'] = { 'open_input_new_session' },
['<leader>oo'] = { 'open_output' },
['<leader>ot'] = { 'toggle_focus' },
['<leader>oq'] = { 'close' },
['<leader>os'] = { 'select_session' },
['<leader>op'] = { 'configure_provider' },
['<leader>od'] = { 'diff_open' },
['<leader>o]'] = { 'diff_next' },
['<leader>o['] = { 'diff_prev' },
['<leader>oc'] = { 'diff_close' },
['<leader>ora'] = { 'diff_revert_all_last_prompt' },
['<leader>ort'] = { 'diff_revert_this_last_prompt' },
['<leader>orA'] = { 'diff_revert_all' },
['<leader>orT'] = { 'diff_revert_this' },
['<leader>orr'] = { 'diff_restore_snapshot_file' },
['<leader>orR'] = { 'diff_restore_snapshot_all' },
['<leader>oC'] = { 'open_configuration_file' },
['<leader>ox'] = { 'swap_position' },
['<leader>opa'] = { 'permission_accept' },
['<leader>opA'] = { 'permission_accept_all' },
['<leader>opd'] = { 'permission_deny' },
},
output_window = {
['<leader>something'] = {function ()
-- custom code
end},
['<esc>'] = { 'close' },
['<C-c>'] = { 'stop' },
[']]'] = { 'next_message' },
['[['] = { 'prev_message' },
['<tab>'] = { 'toggle_pane', mode = { 'n', 'i' } },
['<C-i>'] = { 'focus_input' },
['<leader>oS'] = { 'select_child_session' },
['<leader>oD'] = { 'debug_message' },
['<leader>oO'] = { 'debug_output' },
['<leader>ods'] = { 'debug_session' },
},
input_window = {
['<cr>'] = { 'submit_input_prompt', mode = { 'n', 'i' } },
['<esc>'] = { 'close' },
['<C-c>'] = { 'stop' },
['~'] = { 'mention_file', mode = 'i' },
['@'] = { 'mention', mode = 'i' },
['/'] = { 'slash_commands', mode = 'i' },
['<tab>'] = { 'toggle_pane', mode = { 'n', 'i' } },
['<up>'] = { 'prev_prompt_history', mode = { 'n', 'i' } },
['<down>'] = { 'next_prompt_history', mode = { 'n', 'i' } },
['<M-m>'] = { 'switch_mode' },
['<leader>oS'] = { 'select_child_session' },
['<leader>oD'] = { 'debug_message' },
['<leader>oO'] = { 'debug_output' },
['<leader>ods'] = { 'debug_session' },
},
permission = {
accept = 'a',
accept_all = 'A',
deny = 'd',
},
```
commit fb33ce6
Author: Francis Belanger <francis.belanger@gmail.com>
Date: Tue Oct 7 10:22:36 2025 -0400
refactor: simplify keymaps by having a corresponding api function
commit fa31457
Author: Francis Belanger <francis.belanger@gmail.com>
Date: Tue Oct 7 13:23:32 2025 -0400
feat: restore mentions when navigating history1 parent 25c099d commit c5653ca
File tree
111 files changed
+64422
-1365
lines changed- .github/workflows
- lua/opencode
- ui
- completion
- engines
- tests
- data
- manual
- minimal
- unit
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
111 files changed
+64422
-1365
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
4 | 5 | | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
10 | | - | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
11 | 18 | | |
12 | 19 | | |
13 | 20 | | |
| 21 | + | |
14 | 22 | | |
15 | 23 | | |
16 | 24 | | |
| |||
19 | 27 | | |
20 | 28 | | |
21 | 29 | | |
22 | | - | |
| 30 | + | |
23 | 31 | | |
24 | 32 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
90 | 90 | | |
91 | 91 | | |
92 | 92 | | |
| 93 | + | |
| 94 | + | |
93 | 95 | | |
94 | 96 | | |
95 | 97 | | |
96 | 98 | | |
97 | 99 | | |
98 | 100 | | |
99 | 101 | | |
| 102 | + | |
100 | 103 | | |
101 | | - | |
102 | | - | |
103 | | - | |
104 | | - | |
105 | | - | |
106 | | - | |
107 | | - | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | | - | |
112 | | - | |
113 | | - | |
114 | | - | |
115 | | - | |
116 | | - | |
117 | | - | |
118 | | - | |
119 | | - | |
120 | | - | |
121 | | - | |
122 | | - | |
123 | | - | |
124 | | - | |
125 | | - | |
126 | | - | |
127 | | - | |
128 | | - | |
129 | | - | |
130 | | - | |
131 | | - | |
132 | | - | |
133 | | - | |
134 | | - | |
135 | | - | |
136 | | - | |
137 | | - | |
138 | | - | |
139 | | - | |
140 | | - | |
141 | | - | |
142 | | - | |
143 | | - | |
144 | | - | |
145 | | - | |
146 | | - | |
147 | | - | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
148 | 159 | | |
149 | 160 | | |
150 | 161 | | |
| |||
157 | 168 | | |
158 | 169 | | |
159 | 170 | | |
160 | | - | |
161 | | - | |
| 171 | + | |
| 172 | + | |
162 | 173 | | |
163 | 174 | | |
164 | 175 | | |
165 | 176 | | |
166 | 177 | | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
167 | 182 | | |
168 | 183 | | |
169 | 184 | | |
| |||
174 | 189 | | |
175 | 190 | | |
176 | 191 | | |
177 | | - | |
| 192 | + | |
178 | 193 | | |
179 | 194 | | |
180 | 195 | | |
| |||
309 | 324 | | |
310 | 325 | | |
311 | 326 | | |
| 327 | + | |
312 | 328 | | |
313 | 329 | | |
314 | 330 | | |
315 | 331 | | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
316 | 350 | | |
317 | 351 | | |
318 | 352 | | |
| |||
630 | 664 | | |
631 | 665 | | |
632 | 666 | | |
633 | | - | |
| 667 | + | |
634 | 668 | | |
635 | 669 | | |
| 670 | + | |
| 671 | + | |
| 672 | + | |
| 673 | + | |
| 674 | + | |
| 675 | + | |
| 676 | + | |
| 677 | + | |
| 678 | + | |
| 679 | + | |
| 680 | + | |
| 681 | + | |
| 682 | + | |
| 683 | + | |
| 684 | + | |
| 685 | + | |
| 686 | + | |
| 687 | + | |
| 688 | + | |
| 689 | + | |
| 690 | + | |
| 691 | + | |
| 692 | + | |
| 693 | + | |
| 694 | + | |
636 | 695 | | |
637 | 696 | | |
638 | 697 | | |
| |||
0 commit comments