Skip to content

Commit 892734b

Browse files
author
AG9898
committed
couple changes
1 parent 0db8830 commit 892734b

19 files changed

Lines changed: 490 additions & 214 deletions

File tree

-25 Bytes
Binary file not shown.
-25 Bytes
Binary file not shown.
-25 Bytes
Binary file not shown.

docs/API.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,12 +172,16 @@ Primary assistant surface for conversation and note authoring.
172172
- The page may show a persisted conversation list so an older chat can be resumed without leaving `/chat`.
173173
- Starting a new chat does not require deleting older conversations.
174174
- The composer remains a single unified entry point rather than a primary mode switcher.
175+
- The initial chat mode defaults to inference-first `Auto`.
175176
- The UI may expose compact create/update override controls near the composer, but inference is the default routing path.
177+
- The chat surface may render those override controls and the model picker inside the composer chrome rather than as a separate top toolbar.
176178
- `/chat` is the sole note-authoring entry point for new notes; there is no dedicated new-note page.
177179
- If the assistant detects a strong match to an existing note, the page may surface that note inline and offer research or review actions without forcing an immediate update flow.
180+
- For topic-learning prompts in `Auto` mode that do not strongly match an existing saved note, the assistant may return both a conversational answer and a `create_note` proposal so the user can add the topic to notes immediately.
178181
- The page may render create/update proposals as editable inline draft panels and delete proposals as explicit confirmation cards.
179182
- The page submits full conversation state to `POST /api/assistant/respond`.
180183
- Provider/model options come from the server-side registry in `src/lib/server/ai/models.ts`.
184+
- The UI should continue to initialize provider/model state from those server-supplied defaults rather than introducing visual-only overrides.
181185
- Respond-time prompt grounding also includes the shared canonical note-category list and a bounded deterministic list of existing lower-case note tags so create/update drafts reuse established taxonomy when possible.
182186
- Assistant proposals must follow the standard note skeleton from `docs/NOTES.md`: `Overview`, `Description`, `Key Concepts`, `Connections`, and `Resources`, with only the approved optional sections allowed between `Key Concepts` and `Connections`.
183187
- Assistant prompts also keep `Overview` brief, treat `Description` as the main explanatory section, prefer evergreen explanation over release-churn unless `Version Notes` is warranted, and ban deprecated default headings like `Current Status`, `Notable Features`, `Quick Examples`, and `Industry Usage`.
@@ -187,7 +191,8 @@ Primary assistant surface for conversation and note authoring.
187191
- Assistant responses may include a structured proposal for `create_note`, `update_note`, or `delete_note`.
188192
- Create/update proposals render as editable draft panels in chat before save.
189193
- Delete proposals render as explicit confirmation UI.
190-
- Live web citations may be shown in chat review, but are not persisted as dedicated source metadata.
194+
- Live web citations may be shown in chat review as a collapsed sources disclosure, but are not persisted as dedicated source metadata.
195+
- The chat UI should cap visible source links to a small primary set rather than dumping the full research result list into the thread.
191196
- Persisted chat history stores the app-owned transcript, not provider-managed hidden conversation state.
192197
- Resuming a conversation reconstructs the `messages` payload from saved chat history before calling the assistant again.
193198
- The response payload also includes `routing`, which exposes the resolved mode, matched note, target note, and override source so the chat UI can show the selected branch without inferring it client-side.

docs/ARCHITECTURE.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,7 @@ The dedicated `/notes/new` route has been removed; new-note authoring stays insi
164164
- resolving current note context for update flows before prompting the model
165165
- deriving an explicit delete target only when the user clearly asks to delete a selected or strongly matched saved note
166166
- deciding whether the assistant should answer conversationally only or also return a structured proposal
167+
- allowing eligible topic-learning prompts in inference-first chat mode to return a conversational answer plus a create-note proposal when no strong saved-note match exists
167168
- normalizing proposal payloads before they return to the UI
168169

169170
Target request-time sequence:

docs/DESIGN-SPEC.md

Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -167,12 +167,13 @@ Rules:
167167
Chat is now both the conversation surface and the primary authoring surface.
168168

169169
```
170-
[ history list / drawer ........ ][Conversation column.....]
171-
[ recent chats / new chat ...... ][ assistant toolbar: provider | model | compact override controls ]
172-
[ low-noise resume affordance ...][ note picker row: visible only when Update is active ]
173-
[ compact metadata ..............][ conversation area ....................................... ]
174-
[ ................................][ assistant proposal panel appears inline beneath message ]
175-
[ ................................][ composer ................................................ ]
170+
[ history list / drawer ........ ][ centered conversation column ............................ ]
171+
[ recent chats / new chat ...... ][ minimal brand/title in empty state ...................... ]
172+
[ low-noise resume affordance ...][ composer chrome: inline model | skill-like mode chips .. ]
173+
[ compact notebook index ........][ note picker row: visible only when Update is active .... ]
174+
[ ................................][ conversation area without a dashboard wrapper .......... ]
175+
[ ................................][ assistant proposal panel appears inline beneath message ]
176+
[ ................................][ composer remains the primary entry point ............... ]
176177
```
177178

178179
The assistant must be able to:
@@ -182,6 +183,18 @@ The assistant must be able to:
182183
- request confirmation for deletion
183184
- reopen a saved conversation transcript
184185

186+
Chat layout rules:
187+
- The initial chat state defaults to inference-first `Auto`.
188+
- Empty chat should use a centered, minimal entry state rather than a large explanatory card.
189+
- Remove non-essential top-of-page copy and status pills; the page should not open with a heavy header block.
190+
- The composer should sit in a centered narrow column rather than stretching like a full-width dashboard dock.
191+
- The conversation text bar should be materially smaller than the current wide dock treatment: reduced width, reduced height, reduced padding, and a calmer send affordance.
192+
- The model selector should stay visible in the composer chrome, while provider switching becomes a quieter secondary control.
193+
- `Auto`, `Create`, and `Update` should read like compact skill toggles attached to the composer rather than a separate toolbar, and should be visually smaller than the main prompt surface.
194+
- The update target picker should appear only when `Update` is active, anchored directly under the composer.
195+
- The main chat surface should not be wrapped in a generic dashboard-style container component; the conversation area itself stays visually open.
196+
- Chat should follow the modern AI-reference layout rhythm from `references/UI/chat-example.png`, translated through Techy's tokens and type system rather than copied literally.
197+
185198
### Assistant Proposal Panel
186199

187200
For `create_note` and `update_note` proposals, render an editable draft panel inline in chat.
@@ -255,6 +268,9 @@ The top nav has been replaced with a collapsible left rail (`<nav class="rail">`
255268
- In Update mode, a full-width note-picker `<select>` appears below the toolbar for choosing the note to review
256269
- Send is disabled in Update mode until a note is selected
257270
- Add provider/model selection controls
271+
- Composer chrome is constrained to a centered narrow width on desktop rather than spanning the full conversation column
272+
- Model remains the primary visible selector; provider stays visible but smaller and quieter
273+
- The composer helper copy is minimized; in `Auto` mode the composer does not need an always-visible explanatory sentence
258274
- Render assistant citations and proposal panels inline
259275
- Use Melt for selectors, confirmation affordances, and disclosure-style interaction where it improves accessibility
260276
- Selecting a saved conversation restores its transcript; resuming it should not depend on provider-side hidden memory

docs/STYLE-GUIDE.md

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -136,11 +136,19 @@ Rules:
136136
- keep citations assistive and low-noise
137137
- inferred create/update behavior must not break normal conversation
138138
- persisted chat history should feel like a quiet notebook index, not a busy support inbox
139+
- default the chat entry state to inference-first `Auto`
140+
- reduce page-header copy to the minimum needed; avoid stacked title, eyebrow, lede, and status-pill clutter
141+
- keep the empty state centered and composer-led rather than explaining the product through cards
142+
- keep the model control inline with the composer chrome and demote provider switching to a quieter secondary control
143+
- style `Auto`, `Create`, and `Update` as compact skill-like toggles attached to the composer
144+
- avoid wrapping the main chat surface in a large generic card or dashboard shell
145+
- let the transcript feel flatter and more editorial than the current rounded-component treatment
139146

140147
Recommended desktop arrangement:
141148
- a restrained history rail or drawer for recent chats
142149
- centered conversation column
143-
- assistant controls near the composer
150+
- minimal brand/title above the composer in the empty state
151+
- assistant controls integrated into the composer chrome
144152
- inline editable proposal panel for create/update
145153
- optional secondary context region later, but not required for the first pass
146154

@@ -195,19 +203,26 @@ Rules:
195203
- keep the composer persistent and obvious
196204
- keep the chat surface unified and inference-first
197205
- expose create/update as compact override controls rather than the primary mental model
198-
- show provider/model controls without turning the toolbar into a cockpit; keep the controls compact and adjacent to the composer
206+
- keep the composer visually narrower and calmer than the full route width; it should feel like a centered prompt instrument, not a dashboard dock
207+
- show provider/model controls without turning the composer into a cockpit; keep the controls compact, smaller than the prompt field, and adjacent to it
199208
- let users resume prior conversations without making chat history the dominant visual element
200209
- render note proposals inline as editable review surfaces
201210
- when a strong existing-note match is found, surface it inline and offer further research or review without abruptly switching the user into an edit flow
202-
- show citations during review without overwhelming the draft itself
211+
- show citations during review without overwhelming the draft itself; prefer a collapsed low-noise sources disclosure over inline source dumps
203212
- keep delete confirmation compact and deliberate
204213
- store and present the app-owned transcript as the canonical history view; do not expose provider-specific hidden memory concepts in the UI
214+
- favor a modern AI-chat composition with a centered entry state and composer-led control surface, translated into Techy's typography, tokens, and spacing system
215+
- keep the initial selected mode on `Auto`; explicit create/update remain available as hard overrides, not as the default mental model
216+
- keep the model default sourced from the provider registry; do not introduce hardcoded visual-only model defaults in the chat page
217+
- keep the chat shell in the route surface for this pass; do not introduce a wrapper component that re-boxes the full chat experience
218+
- avoid persistent helper copy in `Auto` mode when the compact composer layout already communicates the interaction model
205219

206220
Avoid:
207221
- making the chat UI look like a separate product
208222
- forcing ambiguous prompts into create/update behavior without a clear signal or fallback
209223
- turning assistant proposals into a wall of utility panels
210224
- turning saved conversation history into a dense email-style list that competes with the current conversation
225+
- recreating the current heavy top-of-page chat header or the `No conversation yet` explainer card
211226

212227
---
213228

docs/test.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ The current unit tests focus on fast, deterministic modules that do not require
2626
- checks required section order, approved optional-section placement, deprecated-heading rejection, and heading normalization
2727
- `src/lib/server/ai/prompts.test.ts`
2828
- verifies create/update assistant prompts both inject the same shared note-structure contract
29+
- `src/lib/server/assistant/routing.test.ts`
30+
- verifies inference-first routing keeps plain learning prompts conversational
31+
- verifies follow-up asks like `add it to notes` or `save this to my notes` route into note creation
2932

3033
## Shared Contract
3134

references/UI/chat-example.png

85.2 KB
Loading

references/UI/current-chat.png

264 KB
Loading

0 commit comments

Comments
 (0)