Repository navigation
Closed
Description
Overview
A chat opened on a type starts with a deterministic description of the type: whether it is built in, what it extends, and each field. The chat view displays only the first line of it, so the user never sees that explanation and has to ask for it. The description also names the parent type and each inherited field's owner as plain code spans, so they are not links.
Problem Statement
Observed on the Software Project type:
- The stored opening message holds the whole description, ending with "What would you like to change?". The local model receives all of it as its first turn (confirmed in the prompt dump).
- The rendered message is one paragraph: "Here is what Software Project is." followed by the option chips. In
chat-message.svelte,clarifyHeaderTextismessage.content.split('\n\n')[0]whenever a message has options. That was written for clarify messages (an opener plus bullets rendered as chips). A bound-chat opening message also carries options ("Explain this type", "Add a field", ...), so it takes the same path and loses every paragraph after the first. - Asking "Explain this type" then makes the model rewrite a description the user could not see. The rewrite was degraded (invented parent, wrong field provenance).
describe_schemarenders the parent as`project`(core/src/schema/description.rs, "It extends{parent}...") and each inherited field's owner as "Fromproject". Only the type itself is a link. The model copied the link pattern for the type and emitted$\text{Project}$for the unlinked parent; the chat renderer shows that literally.
Proposed Solution
Show the full opening message with its options beneath it, keeping the clarify behavior for messages that really are clarify prompts. Render the parent type and each field owner as node links in the description.
Documentation
- ADR-100 §3 (the first option is always to ask) and §5 (a schema is described in plain language from stored data) - what the opening message is.
- No prior doc covers how the chat view truncates messages with options.
Acceptance Criteria
- A bound chat's opening message renders in full: the description, the closing question, then the option chips.
- A clarify message (opener plus bullet options) still renders its opener with the options as chips.
-
describe_schemarenders the parent type and each inherited field's owner as[Name](nodespace://<id>)links; a test asserts the output for a type that extends another. - The links resolve in the chat view the same way the type's own link does.
- A frontend test covers both message shapes (bound opening, clarify) so the first-paragraph rule cannot swallow a bound opening again.
- Code passes
bun run quality:fix;bun run test:changedpasses. Model-facing text changes regenerate the prompt snapshots (UPDATE_GOLDEN=1) and the diff is reviewed.
Technical Specifications
Reference Files
packages/desktop-app/src/lib/components/chat/chat-message.svelte-clarifyHeaderText(the first-paragraph split) and the options blockpackages/core/src/schema/description.rs-describe_schema, the "It extends" sentence and the per-field owner textpackages/daemon/src/services/bound_chat.rs-opening_message,describe_schema_node, the"{}\n\nWhat would you like to change?"template
Related Issues
- None
Activity
mstomar125 commentedon Nov 2, 2026
Picking this up (sweep drain).