Skip to content

TUI: add interactive /config menu for per-request harness config#235

Merged
wjjclaud merged 3 commits into
mainfrom
config-input
Jul 1, 2026
Merged

TUI: add interactive /config menu for per-request harness config#235
wjjclaud merged 3 commits into
mainfrom
config-input

Conversation

@wjjclaud

@wjjclaud wjjclaud commented Jul 1, 2026

Copy link
Copy Markdown
Collaborator
  • /config slash command in the prompt box, with autocompletion suggestion.
  • Menu with three options: View/edit config, Load from file, Cancel.
  • Per-request semantics: the config applies to the next request only and does
    not carry over

Tested both locally and on substrate.

@wjjclaud wjjclaud requested a review from rakyll July 1, 2026 17:56

@rakyll rakyll left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left comments but otherwise LGTM.

Comment thread cmd/ax/harnessconfig.go Outdated
if s == "" {
return nil, nil
}
if err := protojson.Unmarshal([]byte(s), &structpb.Struct{}); err != nil {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should turn harness_config into a bytes field. Proto encoding makes no sense outside of Google.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Replaced protojson by json, for config format checking.

Comment thread cmd/ax/harnessconfig.go Outdated
// returns done=true if the config was updated, or false if the user cancelled
// back to the menu. Invalid JSON is reported and the editor re-opens with the
// user's draft so they can fix it.
func editHarnessConfig(d *internal.Display, harnessConfig *[]byte) (bool, error) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You have a pointer to a byte slice here. Remote it.

Replace the argument with harnessConfig []byte

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@wjjclaud wjjclaud merged commit 22dfe00 into main Jul 1, 2026
8 checks passed
@wjjclaud wjjclaud deleted the config-input branch July 1, 2026 18:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants