Repository navigation
Expand file tree
/
Copy pathconfig_default.lua
More file actions
657 lines (562 loc) · 25.2 KB
/
Copy pathconfig_default.lua
File metadata and controls
657 lines (562 loc) · 25.2 KB
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
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
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
--- @alias agentic.UserConfig.ProviderName
--- | "claude-acp"
--- | "claude-agent-acp"
--- | "gemini-acp"
--- | "codex-acp"
--- | "opencode-acp"
--- | "cursor-acp"
--- | "copilot-acp"
--- | "auggie-acp"
--- | "mistral-vibe-acp"
--- | "cline-acp"
--- | "goose-acp"
--- | "kiro-acp"
--- | "pi-acp"
--- @alias agentic.UserConfig.SessionCwdFn fun(current_cwd: string): string|nil
--- @alias agentic.UserConfig.HeaderRenderFn fun(parts: agentic.ui.ChatWidget.HeaderParts, session_state: agentic.acp.SessionState?): string|nil
--- Per-panel window header: either `{ title, suffix }` or a render function.
--- @alias agentic.UserConfig.Headers table<agentic.ui.ChatWidget.PanelNames, agentic.ui.ChatWidget.HeaderParts|agentic.UserConfig.HeaderRenderFn|nil>
--- Data passed to the on_create_session_response hook
--- @class agentic.UserConfig.CreateSessionResponseData
--- @field session_id? string Convenience field; equals response.sessionId when response is non-nil, nil if creation failed
--- @field session_key integer Stable for the session's whole life
--- @field tab_page_id? number Where it is visible now; nil in the background. DEPRECATED: use session_key
--- @field response? agentic.acp.SessionCreationResponse Raw ACP create-session response, nil on error
--- @field err? agentic.acp.ACPError Error details if session creation failed
--- Data passed to the on_prompt_submit hook
--- @class agentic.UserConfig.PromptSubmitData
--- @field prompt string The user's prompt text
--- @field session_id string The ACP session ID
--- @field session_key integer Stable for the session's whole life
--- @field tab_page_id? number Where it is visible now; nil in the background. DEPRECATED: use session_key
--- Data passed to the before_first_prompt hook
--- @class agentic.UserConfig.BeforeFirstPromptData
--- @field session_id string The ACP session ID
--- @field session_key integer Stable for the session's whole life
--- @field provider_name string The provider running the session, e.g. `claude-agent-acp`
--- Data passed to the on_response_complete hook
--- @class agentic.UserConfig.ResponseCompleteData
--- @field session_id string The ACP session ID
--- @field session_key integer Stable for the session's whole life
--- @field tab_page_id? number Where it is visible now; nil in the background. DEPRECATED: use session_key
--- @field success boolean Whether response completed without error
--- @field error? table Error details if failed
--- Data passed to the on_session_update hook
--- @class agentic.UserConfig.SessionUpdateData
--- @field session_id string The ACP session ID
--- @field session_key integer Stable for the session's whole life
--- @field tab_page_id? number Where it is visible now; nil in the background. DEPRECATED: use session_key
--- @field update agentic.acp.SessionUpdateMessage ACP session update details.
--- Data passed to the on_file_edit hook
--- @class agentic.UserConfig.FileEditData
--- @field filepath string Absolute path to the edited file
--- @field session_id string The ACP session ID
--- @field session_key integer Stable for the session's whole life
--- @field tab_page_id? number Where it is visible now; nil in the background. DEPRECATED: use session_key
--- @field bufnr? number Buffer number if the file is loaded in a buffer
--- Data passed to the on_request_permission hook
--- @class agentic.UserConfig.RequestPermissionData
--- @field request agentic.acp.RequestPermission The permission request object
--- @field session_id string The ACP session ID
--- @field session_key integer Stable for the session's whole life
--- @field tab_page_id? number Where it is visible now; nil in the background. DEPRECATED: use session_key
--- @class agentic.UserConfig.KeymapEntry
--- @field [1] string The key binding
--- @field mode string|string[] The mode(s) for this binding
--- @alias agentic.UserConfig.KeymapValue string | string[] | (string | agentic.UserConfig.KeymapEntry)[]
--- @class agentic.UserConfig.Keymaps.Permission
--- @field cycle_next agentic.UserConfig.KeymapValue Focus next pending permission block
--- @field cycle_prev agentic.UserConfig.KeymapValue Focus previous pending permission block
--- @class agentic.UserConfig.Keymaps.Chat
--- @field next_heading agentic.UserConfig.KeymapValue Jump to next chat heading
--- @field prev_heading agentic.UserConfig.KeymapValue Jump to previous chat heading
--- @field next_tool_call agentic.UserConfig.KeymapValue Jump to next tool call
--- @field prev_tool_call agentic.UserConfig.KeymapValue Jump to previous tool call
--- Key bindings for ALL buffers in the widget
--- @class agentic.UserConfig.Keymaps.Widget
--- @field close agentic.UserConfig.KeymapValue Close the widget
--- @field change_mode agentic.UserConfig.KeymapValue Cycle the agent session mode
--- @field switch_provider agentic.UserConfig.KeymapValue Open the provider switcher
--- @field switch_model agentic.UserConfig.KeymapValue Open the model switcher
--- @field change_thought_level agentic.UserConfig.KeymapValue Open the thought-level switcher
--- @field open_options agentic.UserConfig.KeymapValue Open the agent config options modal
--- @field select_session agentic.UserConfig.KeymapValue Open the session picker
--- @field next_session agentic.UserConfig.KeymapValue Show the next session
--- @field prev_session agentic.UserConfig.KeymapValue Show the previous session
--- @field destroy_session agentic.UserConfig.KeymapValue Destroy the current session
--- Key bindings for the prompt buffer
--- @class agentic.UserConfig.Keymaps.Prompt
--- @field submit agentic.UserConfig.KeymapValue Submit the prompt
--- @field paste_image agentic.UserConfig.KeymapValue Paste an image from the clipboard
--- @field accept_completion agentic.UserConfig.KeymapValue Accept the current completion item
--- Key bindings for diff preview navigation
--- @class agentic.UserConfig.Keymaps.DiffPreview
--- @field next_hunk string Jump to next hunk
--- @field prev_hunk string Jump to previous hunk
--- @class agentic.UserConfig.Keymaps
--- @field widget agentic.UserConfig.Keymaps.Widget
--- @field prompt agentic.UserConfig.Keymaps.Prompt
--- @field chat agentic.UserConfig.Keymaps.Chat
--- @field diff_preview agentic.UserConfig.Keymaps.DiffPreview
--- @field permission agentic.UserConfig.Keymaps.Permission
--- Window-local options, overriding the defaults (wrap, linebreak, winfixheight)
--- @alias agentic.UserConfig.WinOpts table<string, any>
--- @alias agentic.UserConfig.BufferNameFn fun(header: agentic.ui.ChatWidget.HeaderParts, session_state: agentic.acp.SessionState|nil): string|nil
--- @class agentic.UserConfig.Windows.Chat
--- @field buffer_name? string|agentic.UserConfig.BufferNameFn
--- @field win_opts? agentic.UserConfig.WinOpts
--- @class agentic.UserConfig.Windows.Input
--- @field buffer_name? string|agentic.UserConfig.BufferNameFn
--- @field height number
--- @field win_opts? agentic.UserConfig.WinOpts
--- @class agentic.UserConfig.Windows.Code
--- @field buffer_name? string|agentic.UserConfig.BufferNameFn
--- @field max_height number
--- @field win_opts? agentic.UserConfig.WinOpts
--- @class agentic.UserConfig.Windows.Files
--- @field buffer_name? string|agentic.UserConfig.BufferNameFn
--- @field max_height number
--- @field win_opts? agentic.UserConfig.WinOpts
--- @class agentic.UserConfig.Windows.Diagnostics
--- @field buffer_name? string|agentic.UserConfig.BufferNameFn
--- @field max_height number
--- @field win_opts? agentic.UserConfig.WinOpts
--- @class agentic.UserConfig.Windows.Todos
--- @field buffer_name? string|agentic.UserConfig.BufferNameFn
--- @field display boolean
--- @field max_height number
--- @field win_opts? agentic.UserConfig.WinOpts
--- @alias agentic.UserConfig.Windows.Position "right"|"left"|"bottom"
--- @class agentic.UserConfig.Windows
--- @field position agentic.UserConfig.Windows.Position
--- @field width string|number
--- @field height string|number
--- @field stack_width_ratio number
--- @field chat agentic.UserConfig.Windows.Chat
--- @field input agentic.UserConfig.Windows.Input
--- @field code agentic.UserConfig.Windows.Code
--- @field files agentic.UserConfig.Windows.Files
--- @field diagnostics agentic.UserConfig.Windows.Diagnostics
--- @field todos agentic.UserConfig.Windows.Todos
--- @class agentic.UserConfig.SpinnerChars
--- @field generating string[]
--- @field thinking string[]
--- @field searching string[]
--- @field busy string[]
--- Icons used to identify tool call states
--- @class agentic.UserConfig.StatusIcons
--- @field pending string
--- @field in_progress string
--- @field completed string
--- @field failed string
--- Icons used for diagnostics in the context panel
--- @class agentic.UserConfig.DiagnosticIcons
--- @field error string
--- @field warn string
--- @field info string
--- @field hint string
--- @class agentic.UserConfig.PermissionIcons
--- @field allow_once string
--- @field allow_always string
--- @field reject_once string
--- @field reject_always string
--- @class agentic.UserConfig.ChatIcons
--- @field user string
--- @field agent string
--- Icons used for message states in the chat widget
--- @class agentic.UserConfig.MessageIcons
--- @field thinking string
--- @field finished string
--- @field stopped string
--- @field error string
--- @class agentic.UserConfig.FilePicker
--- @field enabled boolean
--- @field auto_trigger boolean When false, disables automatic completion triggering on @
--- @class agentic.UserConfig.SlashCommands
--- @field auto_trigger boolean When false, disables automatic completion triggering on /
--- @class agentic.UserConfig.ImagePaste
--- @field enabled boolean Enable image drag-and-drop to add images to referenced files
--- @class agentic.UserConfig.AutoScroll
--- @field threshold integer Lines from bottom to trigger auto-scroll (default: 10)
--- Show diff preview for edit tool calls in the buffer
--- @class agentic.UserConfig.DiffPreview
--- @field enabled boolean
--- @field layout "inline" | "split"
--- @field center_on_navigate_hunks boolean
--- Tool call folding configuration
--- @class agentic.UserConfig.Folding.ToolCalls
--- @field enabled boolean Whether to fold tool call bodies.
--- @field threshold integer Fold when the interior occupies more than this many wrapped screen rows. 0 always folds. Negative values are clamped to 0.
--- @field fold_on_error boolean Whether failed tool calls should fold when over threshold.
--- Folding behavior in the chat buffer
--- @class agentic.UserConfig.Folding
--- @field tool_calls agentic.UserConfig.Folding.ToolCalls
--- Tool call title display configuration
--- @class agentic.UserConfig.ToolCalls.Title
--- @field max_length integer Maximum title length before truncation. 0 disables truncation.
--- @field truncate_title_kinds agentic.acp.ToolKind[] Tool kinds affected by max_length.
--- Tool call display configuration
--- @class agentic.UserConfig.ToolCalls
--- @field title agentic.UserConfig.ToolCalls.Title
--- @class agentic.UserConfig.Hooks
--- @field before_first_prompt? fun(data: agentic.UserConfig.BeforeFirstPromptData): string|nil Extra text appended after the environment info on the first prompt. Runs synchronously and blocks the prompt while it runs
--- @field on_create_session_response? fun(data: agentic.UserConfig.CreateSessionResponseData): nil
--- @field on_prompt_submit? fun(data: agentic.UserConfig.PromptSubmitData): nil
--- @field on_response_complete? fun(data: agentic.UserConfig.ResponseCompleteData): nil
--- @field on_session_update? fun(data: agentic.UserConfig.SessionUpdateData): nil
--- @field on_file_edit? fun(data: agentic.UserConfig.FileEditData): nil
--- @field on_request_permission? fun(data: agentic.UserConfig.RequestPermissionData): nil
--- Provider switcher UI behavior
--- @class agentic.UserConfig.ProviderSwitcher
--- @field hide_unhealthy_providers boolean Hide providers whose command is not installed
--- @class agentic.UserConfig.ACPConfigs
--- @field session_cwd? agentic.UserConfig.SessionCwdFn
--- Control various behaviors and features of the plugin
--- @class agentic.UserConfig.Settings
--- @field move_cursor_to_chat_on_submit boolean Automatically move cursor to chat window after submitting a prompt
--- @class (partial) agentic.PartialUserConfig.Windows.Chat: agentic.UserConfig.Windows.Chat
--- @class (partial) agentic.PartialUserConfig.Windows.Input: agentic.UserConfig.Windows.Input
--- @class (partial) agentic.PartialUserConfig.Windows.Code: agentic.UserConfig.Windows.Code
--- @class (partial) agentic.PartialUserConfig.Windows.Files: agentic.UserConfig.Windows.Files
--- @class (partial) agentic.PartialUserConfig.Windows.Diagnostics: agentic.UserConfig.Windows.Diagnostics
--- @class (partial) agentic.PartialUserConfig.Windows.Todos: agentic.UserConfig.Windows.Todos
--- @class (partial) agentic.PartialUserConfig.Keymaps.Widget: agentic.UserConfig.Keymaps.Widget
--- @class (partial) agentic.PartialUserConfig.Keymaps.Prompt: agentic.UserConfig.Keymaps.Prompt
--- @class (partial) agentic.PartialUserConfig.Keymaps.Chat: agentic.UserConfig.Keymaps.Chat
--- @class (partial) agentic.PartialUserConfig.Keymaps.DiffPreview: agentic.UserConfig.Keymaps.DiffPreview
--- @class (partial) agentic.PartialUserConfig.Keymaps.Permission: agentic.UserConfig.Keymaps.Permission
--- @class (partial) agentic.PartialUserConfig.SpinnerChars: agentic.UserConfig.SpinnerChars
--- @class (partial) agentic.PartialUserConfig.StatusIcons: agentic.UserConfig.StatusIcons
--- @class (partial) agentic.PartialUserConfig.DiagnosticIcons: agentic.UserConfig.DiagnosticIcons
--- @class (partial) agentic.PartialUserConfig.PermissionIcons: agentic.UserConfig.PermissionIcons
--- @class (partial) agentic.PartialUserConfig.ChatIcons: agentic.UserConfig.ChatIcons
--- @class (partial) agentic.PartialUserConfig.MessageIcons: agentic.UserConfig.MessageIcons
--- @class (partial) agentic.PartialUserConfig.SlashCommands: agentic.UserConfig.SlashCommands
--- @class (partial) agentic.PartialUserConfig.FilePicker: agentic.UserConfig.FilePicker
--- @class (partial) agentic.PartialUserConfig.ImagePaste: agentic.UserConfig.ImagePaste
--- @class (partial) agentic.PartialUserConfig.AutoScroll: agentic.UserConfig.AutoScroll
--- @class (partial) agentic.PartialUserConfig.DiffPreview: agentic.UserConfig.DiffPreview
--- @class (partial) agentic.PartialUserConfig.Folding.ToolCalls: agentic.UserConfig.Folding.ToolCalls
--- @class (partial) agentic.PartialUserConfig.ToolCalls.Title: agentic.UserConfig.ToolCalls.Title
--- @class (partial) agentic.PartialUserConfig.Settings: agentic.UserConfig.Settings
--- @class (partial) agentic.PartialUserConfig.ProviderSwitcher: agentic.UserConfig.ProviderSwitcher
--- @class (partial) agentic.PartialUserConfig.Windows: agentic.UserConfig.Windows
--- @field chat? agentic.PartialUserConfig.Windows.Chat
--- @field input? agentic.PartialUserConfig.Windows.Input
--- @field code? agentic.PartialUserConfig.Windows.Code
--- @field files? agentic.PartialUserConfig.Windows.Files
--- @field diagnostics? agentic.PartialUserConfig.Windows.Diagnostics
--- @field todos? agentic.PartialUserConfig.Windows.Todos
--- @class (partial) agentic.PartialUserConfig.Keymaps: agentic.UserConfig.Keymaps
--- @field widget? agentic.PartialUserConfig.Keymaps.Widget
--- @field prompt? agentic.PartialUserConfig.Keymaps.Prompt
--- @field chat? agentic.PartialUserConfig.Keymaps.Chat
--- @field diff_preview? agentic.PartialUserConfig.Keymaps.DiffPreview
--- @field permission? agentic.PartialUserConfig.Keymaps.Permission
--- @class (partial) agentic.PartialUserConfig.Folding: agentic.UserConfig.Folding
--- @field tool_calls? agentic.PartialUserConfig.Folding.ToolCalls
--- @class (partial) agentic.PartialUserConfig.ToolCalls: agentic.UserConfig.ToolCalls
--- @field title? agentic.PartialUserConfig.ToolCalls.Title
--- @class (partial) agentic.PartialUserConfig: agentic.UserConfig
--- @field acp_configs? agentic.UserConfig.ACPConfigs
--- @field windows? agentic.PartialUserConfig.Windows
--- @field keymaps? agentic.PartialUserConfig.Keymaps
--- @field spinner_chars? agentic.PartialUserConfig.SpinnerChars
--- @field status_icons? agentic.PartialUserConfig.StatusIcons
--- @field diagnostic_icons? agentic.PartialUserConfig.DiagnosticIcons
--- @field permission_icons? agentic.PartialUserConfig.PermissionIcons
--- @field chat_icons? agentic.PartialUserConfig.ChatIcons
--- @field message_icons? agentic.PartialUserConfig.MessageIcons
--- @field file_picker? agentic.PartialUserConfig.FilePicker
--- @field slash_commands? agentic.PartialUserConfig.SlashCommands
--- @field image_paste? agentic.PartialUserConfig.ImagePaste
--- @field auto_scroll? agentic.PartialUserConfig.AutoScroll
--- @field diff_preview? agentic.PartialUserConfig.DiffPreview
--- @field folding? agentic.PartialUserConfig.Folding
--- @field tool_calls? agentic.PartialUserConfig.ToolCalls
--- @field settings? agentic.PartialUserConfig.Settings
--- @field provider_switcher? agentic.PartialUserConfig.ProviderSwitcher
--- @class agentic.UserConfig
--- @field debug boolean Enable printing debug messages which can be read via `:messages`
--- @field provider agentic.UserConfig.ProviderName
--- @field acp_providers table<agentic.UserConfig.ProviderName, agentic.acp.ACPProviderConfig|nil>
--- @field windows agentic.UserConfig.Windows
--- @field keymaps agentic.UserConfig.Keymaps
--- @field spinner_chars agentic.UserConfig.SpinnerChars
--- @field status_icons agentic.UserConfig.StatusIcons
--- @field diagnostic_icons agentic.UserConfig.DiagnosticIcons
--- @field permission_icons agentic.UserConfig.PermissionIcons
--- @field chat_icons agentic.UserConfig.ChatIcons
--- @field message_icons agentic.UserConfig.MessageIcons
--- @field file_picker agentic.UserConfig.FilePicker
--- @field slash_commands agentic.UserConfig.SlashCommands
--- @field image_paste agentic.UserConfig.ImagePaste
--- @field auto_scroll agentic.UserConfig.AutoScroll
--- @field diff_preview agentic.UserConfig.DiffPreview
--- @field folding agentic.UserConfig.Folding
--- @field tool_calls agentic.UserConfig.ToolCalls
--- @field hooks agentic.UserConfig.Hooks
--- @field headers agentic.UserConfig.Headers
--- @field acp_configs agentic.UserConfig.ACPConfigs
--- @field settings agentic.UserConfig.Settings
--- @field provider_switcher agentic.UserConfig.ProviderSwitcher
local ConfigDefault = {
debug = false,
provider = "claude-agent-acp",
acp_providers = {
["claude-agent-acp"] = {
name = "Claude Agent ACP",
command = "claude-agent-acp",
-- The SDK sets CLAUDE_CODE_ENTRYPOINT=sdk-ts, which makes the
-- `claude --resume` picker filter these sessions out. Overriding it to make our sessions visible.
env = { CLAUDE_CODE_ENTRYPOINT = "agentic-nvim" },
},
["claude-acp"] = {
name = "Claude ACP",
command = "claude-code-acp",
env = { CLAUDE_CODE_ENTRYPOINT = "agentic-nvim" },
},
["gemini-acp"] = {
name = "Gemini ACP",
command = "gemini",
args = { "--acp" },
env = {},
},
["codex-acp"] = {
name = "Codex ACP",
-- https://github.com/zed-industries/codex-acp/releases
-- xattr -dr com.apple.quarantine ~/.local/bin/codex-acp
command = "codex-acp",
args = {
-- "-c",
-- "features.web_search_request=true", -- disabled as it doesn't send proper tool call messages
},
env = {},
},
["opencode-acp"] = {
name = "OpenCode ACP",
command = "opencode",
args = { "acp" },
env = {},
},
["cursor-acp"] = {
name = "Cursor Agent ACP",
command = "cursor-agent",
args = {
"acp",
},
env = {},
},
["copilot-acp"] = {
name = "Copilot ACP",
command = "copilot",
args = {
"--acp",
"--stdio",
},
env = {},
},
["auggie-acp"] = {
name = "Auggie ACP",
command = "auggie",
args = {
"--acp",
},
env = {},
},
["mistral-vibe-acp"] = {
name = "Mistral Vibe ACP",
command = "vibe-acp",
args = {},
env = {},
},
["cline-acp"] = {
name = "Cline ACP",
command = "cline",
args = { "--acp" },
env = {},
},
["goose-acp"] = {
name = "Goose ACP",
command = "goose",
args = { "acp" },
env = {},
},
["kiro-acp"] = {
name = "Kiro ACP",
command = "kiro-cli",
args = { "acp" },
env = {},
},
["pi-acp"] = {
name = "Pi ACP",
command = "pi-acp",
env = {},
},
},
windows = {
position = "right",
width = "40%",
height = "30%",
stack_width_ratio = 0.4,
chat = { win_opts = {} },
input = { height = 10, win_opts = {} },
code = { max_height = 15, win_opts = {} },
files = { max_height = 10, win_opts = {} },
diagnostics = { max_height = 10, win_opts = {} },
todos = { display = true, max_height = 10, win_opts = {} },
},
keymaps = {
--- Keys bindings for ALL buffers in the widget
widget = {
close = "q",
change_mode = {
{
"<S-Tab>",
mode = { "i", "n", "v" },
},
},
switch_provider = "<localLeader>s",
switch_model = "<localLeader>m",
change_thought_level = "<localLeader>t",
open_options = "<localLeader>o",
select_session = "<localLeader>l",
next_session = "<localLeader>]",
prev_session = "<localLeader>[",
destroy_session = "<localLeader>D",
},
--- Keys bindings for the prompt buffer
prompt = {
submit = {
"<CR>",
{
"<C-s>",
mode = { "i", "n", "v" },
},
},
paste_image = {
{
"<localLeader>p",
mode = { "n" },
},
{
"<C-v>", -- Same as Claude-code in insert mode
mode = { "i" },
},
},
accept_completion = {
{
"<Tab>",
mode = { "i" },
},
},
},
--- Keys bindings for chat buffer navigation
chat = {
next_heading = "]]",
prev_heading = "[[",
next_tool_call = "]t",
prev_tool_call = "[t",
},
--- Keys bindings for diff preview navigation
diff_preview = {
next_hunk = "]c",
prev_hunk = "[c",
},
permission = {
cycle_next = "<C-n>",
cycle_prev = "<C-p>",
},
},
-- stylua: ignore start
spinner_chars = {
generating = { "·", "✢", "✳", "∗", "✻", "✽" },
thinking = { "🤔", "🤨" },
searching = { "🔎. . .", ". 🔎. .", ". . 🔎." },
busy = { "⡀", "⠄", "⠂", "⠁", "⠈", "⠐", "⠠", "⢀", "⣀", "⢄", "⢂", "⢁", "⢈", "⢐", "⢠", "⣠", "⢤", "⢢", "⢡", "⢨", "⢰", "⣰", "⢴", "⢲", "⢱", "⢸", "⣸", "⢼", "⢺", "⢹", "⣹", "⢽", "⢻", "⣻", "⢿", "⣿", },
},
-- stylua: ignore end
status_icons = {
pending = "",
in_progress = "",
completed = "✔",
failed = "",
},
diagnostic_icons = {
error = "❌",
warn = "⚠️",
info = "ℹ️",
hint = "✨",
},
permission_icons = {
allow_once = "",
allow_always = "",
reject_once = "",
reject_always = "",
},
chat_icons = {
user = " ",
agent = " ",
},
message_icons = {
thinking = "🧠",
finished = "🏁",
stopped = "🛑",
error = "❌",
},
file_picker = {
enabled = true,
auto_trigger = true,
},
slash_commands = {
auto_trigger = true,
},
image_paste = {
enabled = true,
},
auto_scroll = {
threshold = 10,
},
diff_preview = {
enabled = true,
layout = "split",
center_on_navigate_hunks = true,
},
folding = {
tool_calls = {
enabled = true,
threshold = 10,
fold_on_error = false,
},
},
tool_calls = {
title = {
max_length = 50,
truncate_title_kinds = {
"execute",
"think",
"SubAgent",
"fetch",
"search",
},
},
},
hooks = {
before_first_prompt = nil,
on_create_session_response = nil,
on_prompt_submit = nil,
on_response_complete = nil,
on_session_update = nil,
on_file_edit = nil,
on_request_permission = nil,
},
headers = {},
acp_configs = {},
settings = {
move_cursor_to_chat_on_submit = true,
},
provider_switcher = {
hide_unhealthy_providers = false,
},
}
return ConfigDefault