detached 8bfedf7

refactor(agent): remove unused prompt refresh callback

commit
8bfedf7979e06d8e52382aba51b4b6f77b4977c8
author
brice · · 2026-10-06 08:06 UTC
parent
f27a376
signature
GPG VerifiedCD88F9E564E0102646FB6077A1A07C7C7C3E349D · arch-gpg Verified for the committer email
4 files · +4 -29
M docs/zutfiles.md +1 -1
@@ -115,7 +115,7 @@ Set `replace_system_prompt` to `true` in the manifest to use `AGENT.md` as the r
115115 }
116116 ```
117117
118-Replacement is intended for fully specialized agents. It replaces zut's built-in identity, while global append addenda such as project context and skills retain their normal inclusion rules. The default layering behavior is usually preferable because it retains zut's normal identity and tool-use guidance.
118+Replacement is intended for fully specialized agents. It replaces zut's built-in identity, while shared harness guidance and global append addenda such as project context and skills retain their normal inclusion rules. The default layering behavior is usually preferable because it retains zut's normal identity and tool-use guidance.
119119
120120 ## Bundled skills
121121
@@ -115,7 +115,7 @@ Set `replace_system_prompt` to `true` in the manifest to use `AGENT.md` as the r
115 }115 }
116 ```116 ```
117 117
118-Replacement is intended for fully specialized agents. It replaces zut's built-in identity, while global append addenda such as project context and skills retain their normal inclusion rules. The default layering behavior is usually preferable because it retains zut's normal identity and tool-use guidance.118+Replacement is intended for fully specialized agents. It replaces zut's built-in identity, while shared harness guidance and global append addenda such as project context and skills retain their normal inclusion rules. The default layering behavior is usually preferable because it retains zut's normal identity and tool-use guidance.
119 119
120 ## Bundled skills120 ## Bundled skills
121 121
M packages/agent/cli.go +1 -10
@@ -2808,16 +2808,7 @@ func runInteractive(ctx context.Context, args Args, version string) (runErr erro
28082808 setWebSearchAvailable(webSearchPolicy == subagents.WebSearchAllow)
28092809 return nil
28102810 },
2811- SetWebSearchAvailable: setWebSearchAvailable,
2812- RefreshPrompt: func() error {
2813- current := liveInteractiveAgent(iv, ag)
2814- webSearchPolicy, err := refreshAgentToolsAndPrompt(args, sharedSandbox, extToolAdapter, current, prepareInteractiveRegistryWithScheduler, iv)
2815- if err != nil {
2816- return err
2817- }
2818- setWebSearchAvailable(webSearchPolicy == subagents.WebSearchAllow)
2819- return nil
2820- },
2811+ SetWebSearchAvailable: setWebSearchAvailable,
28212812 AuthManager: mgr,
28222813 LlamaCPPConfig: ResolveLlamaCPPConfig,
28232814 RefreshLlamaCPPModels: RefreshLlamaCPPModels,
@@ -2808,16 +2808,7 @@ func runInteractive(ctx context.Context, args Args, version string) (runErr erro
2808 setWebSearchAvailable(webSearchPolicy == subagents.WebSearchAllow)2808 setWebSearchAvailable(webSearchPolicy == subagents.WebSearchAllow)
2809 return nil2809 return nil
2810 },2810 },
2811- SetWebSearchAvailable: setWebSearchAvailable,2811+ SetWebSearchAvailable: setWebSearchAvailable,
2812- RefreshPrompt: func() error {
2813- current := liveInteractiveAgent(iv, ag)
2814- webSearchPolicy, err := refreshAgentToolsAndPrompt(args, sharedSandbox, extToolAdapter, current, prepareInteractiveRegistryWithScheduler, iv)
2815- if err != nil {
2816- return err
2817- }
2818- setWebSearchAvailable(webSearchPolicy == subagents.WebSearchAllow)
2819- return nil
2820- },
2821 AuthManager: mgr,2812 AuthManager: mgr,
2822 LlamaCPPConfig: ResolveLlamaCPPConfig,2813 LlamaCPPConfig: ResolveLlamaCPPConfig,
2823 RefreshLlamaCPPModels: RefreshLlamaCPPModels,2814 RefreshLlamaCPPModels: RefreshLlamaCPPModels,
M packages/agent/modes/interactive.go +0 -4
@@ -228,10 +228,6 @@ type InteractiveConfig struct {
228228 // web-search guard and resident child policy.
229229 SetWebSearchAvailable func(bool)
230230
231- // RefreshPrompt re-resolves the complete live prompt and tool registry
232- // after a prompt-affecting setting changes. Optional for embedders.
233- RefreshPrompt func() error
234-
235231 // AutoSubmitInitial, when true, auto-submits InitialInput after
236232 // StartupPre completes (or immediately when StartupPre is empty).
237233 // When false, InitialInput only pre-fills the editor.
@@ -228,10 +228,6 @@ type InteractiveConfig struct {
228 // web-search guard and resident child policy.228 // web-search guard and resident child policy.
229 SetWebSearchAvailable func(bool)229 SetWebSearchAvailable func(bool)
230 230
231- // RefreshPrompt re-resolves the complete live prompt and tool registry
232- // after a prompt-affecting setting changes. Optional for embedders.
233- RefreshPrompt func() error
234-
235 // AutoSubmitInitial, when true, auto-submits InitialInput after231 // AutoSubmitInitial, when true, auto-submits InitialInput after
236 // StartupPre completes (or immediately when StartupPre is empty).232 // StartupPre completes (or immediately when StartupPre is empty).
237 // When false, InitialInput only pre-fills the editor.233 // When false, InitialInput only pre-fills the editor.
M packages/agent/systemprompt_test.go +2 -14
@@ -6,20 +6,6 @@ import (
66 "time"
77 )
88
9-func TestBuildSystemPromptAlwaysIncludesVerificationGuidance(t *testing.T) {
10- for _, custom := range []string{"", "Custom identity"} {
11- prompt := BuildSystemPrompt(SystemPromptOpts{Custom: custom, Append: []string{"Project context"}})
12- for _, want := range []string{
13- "Verify changes with checks appropriate to their scope.",
14- "Report which checks ran and what remains unverified.",
15- } {
16- if count := strings.Count(prompt, want); count != 1 {
17- t.Fatalf("verification guidance %q count = %d, want 1", want, count)
18- }
19- }
20- }
21-}
22-
239 func TestBuildSystemPromptAlwaysPrefersDedicatedTools(t *testing.T) {
2410 for _, custom := range []string{"", "Custom identity"} {
2511 prompt := BuildSystemPrompt(SystemPromptOpts{Custom: custom})
@@ -127,6 +113,8 @@ func TestBuildSystemPromptAlwaysIncludesTaskAndSkillGuidance(t *testing.T) {
127113 "Final answers contain the result of the work or a concrete blocker",
128114 "Respect requests for explanation, planning, or review without making unsolicited changes",
129115 "Ask only when a necessary decision blocks safe, correct progress",
116+ "Verify changes with checks appropriate to their scope.",
117+ "Report which checks ran and what remains unverified.",
130118 "Preserve tool permissions, required confirmations, and explicit approval requirements",
131119 "Explicit user instructions take precedence over skill guidelines",
132120 "Skills do not grant permissions or override system or developer constraints",
@@ -6,20 +6,6 @@ import (
6 "time"6 "time"
7 )7 )
8 8
9-func TestBuildSystemPromptAlwaysIncludesVerificationGuidance(t *testing.T) {
10- for _, custom := range []string{"", "Custom identity"} {
11- prompt := BuildSystemPrompt(SystemPromptOpts{Custom: custom, Append: []string{"Project context"}})
12- for _, want := range []string{
13- "Verify changes with checks appropriate to their scope.",
14- "Report which checks ran and what remains unverified.",
15- } {
16- if count := strings.Count(prompt, want); count != 1 {
17- t.Fatalf("verification guidance %q count = %d, want 1", want, count)
18- }
19- }
20- }
21-}
22-
23 func TestBuildSystemPromptAlwaysPrefersDedicatedTools(t *testing.T) {9 func TestBuildSystemPromptAlwaysPrefersDedicatedTools(t *testing.T) {
24 for _, custom := range []string{"", "Custom identity"} {10 for _, custom := range []string{"", "Custom identity"} {
25 prompt := BuildSystemPrompt(SystemPromptOpts{Custom: custom})11 prompt := BuildSystemPrompt(SystemPromptOpts{Custom: custom})
@@ -127,6 +113,8 @@ func TestBuildSystemPromptAlwaysIncludesTaskAndSkillGuidance(t *testing.T) {
127 "Final answers contain the result of the work or a concrete blocker",113 "Final answers contain the result of the work or a concrete blocker",
128 "Respect requests for explanation, planning, or review without making unsolicited changes",114 "Respect requests for explanation, planning, or review without making unsolicited changes",
129 "Ask only when a necessary decision blocks safe, correct progress",115 "Ask only when a necessary decision blocks safe, correct progress",
116+ "Verify changes with checks appropriate to their scope.",
117+ "Report which checks ran and what remains unverified.",
130 "Preserve tool permissions, required confirmations, and explicit approval requirements",118 "Preserve tool permissions, required confirmations, and explicit approval requirements",
131 "Explicit user instructions take precedence over skill guidelines",119 "Explicit user instructions take precedence over skill guidelines",
132 "Skills do not grant permissions or override system or developer constraints",120 "Skills do not grant permissions or override system or developer constraints",

Keyboard shortcuts

Single-key shortcuts are on. ctrl k and esc work whatever this says.

ctrl k :
go to a section, branch, tag, file or repository
?
this list
j k
move the row cursor down / up
enter
open the row under the cursor; on Files, a directory opens or closes in place
↑ ↓ ← → home end
in the file tree (focus on a row): previous / next row, close / open a directory or go to its parent / first entry, first / last row. They never open a file
l h
on Files: open a directory or a file / close a directory or go up to its parent, then to the parent page. Elsewhere: into the side panel (on a merge request, its files) / back to the content; there j k move between its controls
g g G
first / last row
/
filter the list; on Files, find a file anywhere in the repository (esc clears, enter opens the best match)
b
switch branch or tag
g s g f g c g b g m g i g r g a
tabs: summary, files, commits, branches & tags, merge requests, issues, releases, actions (when available)
g h
home
w
wide mode: use the whole width of the screen, or not (remembered)
y
copy a permalink pinned to the commit
d u x
diff: split / unified / collapse or expand all
e E
diff: the whole file in view / every file, with the lines the hunks hide
n
merge request: next note in the diff
esc
close a dialog, leave a field

Branches 1

Tags 476

↑↓ moveenter openesc close