Thanks to visit codestin.com
Credit goes to github.com

Skip to content

feat: structure chat summaries as a headline plus bullets - #29203

Merged
david-fraley merged 5 commits into
mainfrom
dfraley/structured-chat-summary-prompt
Sep 11, 2026
Merged

feat: structure chat summaries as a headline plus bullets#29203
david-fraley merged 5 commits into
mainfrom
dfraley/structured-chat-summary-prompt

Conversation

@david-fraley

@david-fraley david-fraley commented Sep 10, 2026

Copy link
Copy Markdown
Collaborator

Rewrites the chat summary prompt (chatSummaryGenerationPrompt) so the summary panel shows a capability-first headline plus optional bullets instead of 1-3 sentences of prose. The headline names what the chat defines, controls, or configures in present tense rather than recapping what happened.

Implementation follows #28013: the model returns structured headline and bullets fields, the server serializes them to markdown, and validation checks each field. Identifiers are backticked and render as inline code. None of that PR's panel UX changes are included here.

ELI5: The "what is this chat about" box used to write a blob of sentences. Now it writes one short title line and a few bullets, so it is easier to skim.

Example output

Live generation against this PR's own chat (claude-sonnet-4-5):

Changes the chat summary prompt to produce a one-sentence headline plus bullets for quick-reference popovers

  • Replaces chatSummaryGenerationPrompt in coderd/x/chatd/quickgen.go:916 with the new structured prompt
  • Integrates PR 28013's generatedChatSummary with headline and bullets fields instead of flat sentences
  • Updates validateGeneratedChatSummary to enforce summaryHeadlineMaxWords = 20 and summaryMaxBullets = 4
  • Adds Storybook play assertions for bullet rendering, inline code, and headline-only summaries in PR feat: structure chat summaries as a headline plus bullets #29203

Proof

Storybook story pages/AgentsPage/ChatSummary:

Headline + bullets Headline only

Created by Coder Agents on behalf of @david-fraley.

The summary panel prompt now asks for a short declarative headline followed
by 2-4 markdown bullets. Summary normalization keeps line breaks, validation
caps lines instead of sentences and requires a headline first line, and the
panel renders the summary as markdown so bullets are not flattened.
Adopts the structured-object approach from #28013: the model returns headline
and bullets fields that the server serializes to markdown, so validation can
check each field instead of parsing the rendered string. Keeps the
capability-first headline wording, enforces the 20-word headline limit, and
renders through InlineMarkdown so backticked identifiers become inline code.
@david-fraley
david-fraley marked this pull request as ready for review September 11, 2026 13:20
…t and cover rendering

Says 20 words or fewer so the prompt matches summaryHeadlineMaxWords, adds
"Changes..." to the headline openers and present tense to the bullet
instruction to match what the model actually produces, and adds play
assertions covering bullet list items, inline code, headline-only summaries
and plain-text links.
Comment thread site/src/pages/AgentsPage/components/ChatSummary.tsx Outdated
Comment thread site/src/pages/AgentsPage/components/ChatSummary.tsx Outdated
Comment thread site/src/pages/AgentsPage/components/ChatSummary.tsx Outdated
Comment thread site/src/pages/AgentsPage/components/ChatSummary.tsx Outdated
Comment thread site/src/pages/AgentsPage/components/ChatSummary.tsx Outdated
Comment thread site/src/pages/AgentsPage/components/ChatSummary.stories.tsx Outdated
Comment thread site/src/pages/AgentsPage/components/ChatSummary.stories.tsx Outdated
Comment thread site/src/pages/AgentsPage/components/ChatSummary.stories.tsx Outdated
Comment thread site/src/pages/AgentsPage/components/ChatSummary.stories.tsx Outdated
Drops the play-function assertions per FE1, so the stories only cover visual
states for Pixel, removes the comments flagged as unnecessary, and uses the
wrap-anywhere utility instead of an arbitrary overflow-wrap property.
@david-fraley

Copy link
Copy Markdown
Collaborator Author

Thanks, all applied in 0d2efa5:

  • Dropped the play assertions; the four stories now only set up visual states for Pixel, per FE1 in site/AGENTS.md. The DOM-presence checks I had were exactly what the screenshot is supposed to cover, so they are gone rather than moved to Vitest.
  • Removed the comments flagged as unnecessary.
  • Took the wrap-anywhere suggestion.

Created by Coder Agents on behalf of @david-fraley.

@david-fraley
david-fraley enabled auto-merge (squash) September 11, 2026 20:07
@david-fraley
david-fraley merged commit ab53ecf into main Sep 11, 2026
28 checks passed
@david-fraley
david-fraley deleted the dfraley/structured-chat-summary-prompt branch September 11, 2026 20:17
@github-actions github-actions Bot locked and limited conversation to collaborators Sep 11, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants