Cut transcript noise: fold grey boxes, drop duplicate review rows

This commit is contained in:
Ian Gulliver
2026-10-20 13:04:17 -07:00
parent 0f33ad4524
commit a7b2333535
14 changed files with 312 additions and 290 deletions
+1 -7
View File
@@ -24,7 +24,6 @@ var attachmentKinds = []api.AttachmentKind{
type askArgs struct {
Context string `json:"context"`
Question string `json:"question"`
WhyBlocked string `json:"why_blocked"`
Attachments []api.Attachment `json:"attachments"`
ThreadID string `json:"thread_id"`
}
@@ -58,7 +57,6 @@ func (m *Manager) askTool(l *live) mcp.Tool {
"properties": {
"context": {"type": "string", "description": "Everything the human needs to answer well without reading your transcript: what you are working on, what you found, the relevant facts and data shared by all the choices, and then the choices. Markdown is rendered. Each choice is a list item, at least two, all of one kind: '- ( ) Merge now' / '- (*) Wait for review' (pick one; exactly one (*) marks your recommendation), or '- [ ] Fix the tests' / '- [x] Update the docs' (pick any; [x] marks the ones you recommend). The choice's first line, after the marker, is a short name that comes back verbatim as the answer. Everything about that one choice goes in lines indented two spaces beneath it, not in a paragraph above the list: what it would concretely do, its worked example, any code block, command or sub-list, and its trade-offs. For example:\n\n- ( ) Retry in the client\n Wraps ` + "`fetch` in `retry(3)`" + `; a 500 shows the spinner up to 6s longer.\n ` + "```" + `ts\n await retry(3, () => api.get(path));\n ` + "```" + `\n- (*) Queue on the server\n The request returns at once; the write lands within 1s.\n\nPut long supporting detail (logs, full data, per-option analysis) in collapsed sections the human expands on demand: a line '<details><summary>Title</summary>', the Markdown content, then a line '</details>'."},
"question": {"type": "string", "description": "The question itself, in one or two sentences. Markdown is rendered."},
"why_blocked": {"type": "string", "description": "What you can't do until this is answered, and why you can't decide it yourself."},
"attachments": {"type": "array", "items": {
"type": "object",
"properties": {
@@ -77,7 +75,7 @@ func (m *Manager) askTool(l *live) mcp.Tool {
}},
"thread_id": {"type": "string"}
},
"required": ["context", "question", "why_blocked"]
"required": ["context", "question"]
}`),
Handler: func(ctx context.Context, raw json.RawMessage) (string, error) {
return m.ask(ctx, l, raw)
@@ -121,7 +119,6 @@ func (m *Manager) ask(ctx context.Context, l *live, raw json.RawMessage) (string
payload := map[string]any{
"context": args.Context,
"question": args.Question,
"why_blocked": args.WhyBlocked,
"options": options,
"multiple": choices[0].checkbox,
"recommended": recommended,
@@ -259,9 +256,6 @@ func (m *Manager) validateAsk(ctx context.Context, l *live, args askArgs) error
if strings.TrimSpace(args.Question) == "" {
problems = append(problems, "question is empty")
}
if strings.TrimSpace(args.WhyBlocked) == "" {
problems = append(problems, "why_blocked is empty: say what you can't do until this is answered and why you can't decide it yourself")
}
choices := parseChoices(args.Context)
if len(choices) < 2 {
problems = append(problems, "context needs at least two choices, each a list item on its own line: `- ( ) choice` (pick one) or `- [ ] choice` (pick any)")