Skip to content

feat(conversation): add the chat data contract and its helpers - #1

Closed
pratikbuilds wants to merge 1 commit into
conversation-basefrom
conversation/01-contract
Closed

pratikbuilds wants to merge 1 commit into
conversation-basefrom
conversation/01-contract

Conversation

@pratikbuilds

Copy link
Copy Markdown
Owner

Add src/lib/conversation.ts, the message model and part union every chat component reads: a tool part carrying an approval record beside the call, parallel tool batches, generated images, sources, a streaming status, replies and reactions. It reuses the chat-parts.ts members unchanged.

Add groupActivity and summarizeActivity to fold thinking and tool steps into one run, mediaKindOf, and checkAttachments for count, size and duplicate limits. Add the --attention-wash token, mixed from --primary.

First in the stack; based on main at 8300019. Part of corbitsdev#94.

Notes for review

  • --attention-wash mixes 12% of --primary (reference design: 11% light / 14% dark; one value serves both).
  • Summary durations are whole seconds ("4s", "1m 05s"); the old parts-renderer shows "4.0s" until it is removed.
  • An approval resolving merges the activity runs on either side; the later run's key changes (documented, tested).

Verification

  • This commit passes bun run typecheck and bun run lint on its own (the stack is checked commit by commit).
  • At the top of the stack: bun run check, bun run build, bun run dep-guard, bun run contrast-test and bun run test:e2e (Playwright specs and the Storybook axe sweep in light and dark) pass.

Closes corbitsdev#95

Add src/lib/conversation.ts, the message model and part union every chat
component reads: a tool part carrying an approval record beside the call,
parallel tool batches, generated images, sources, a streaming status,
replies and reactions. It reuses the chat-parts.ts members unchanged.

Add groupActivity and summarizeActivity to fold thinking and tool steps
into one run, mediaKindOf, and checkAttachments for count, size and
duplicate limits. Add the --attention-wash token, mixed from --primary.
@pratikbuilds

Copy link
Copy Markdown
Owner Author

Moved upstream: corbitsdev#113

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.

1 participant