Skip to content

feat(ai): rename conversations + reasoning block - #101

Merged
os-zhuang merged 1 commit into
mainfrom
feat/ai-rename-reasoning
Jun 10, 2026
Merged

feat(ai): rename conversations + reasoning block#101
os-zhuang merged 1 commit into
mainfrom
feat/ai-rename-reasoning

Conversation

@os-zhuang

Copy link
Copy Markdown
Contributor

What

The last two AI-assistant polish items.

Rename conversations

  • store renameConversation action (optimistic list update → PATCH /conversations/:id), exposed via useAIChat.
  • Drawer gains a pencil affordance per conversation → a rename Dialog (TextInput + Save/Cancel). renameConversation() was already in the API client.

Reasoning block (build-ready)

  • parseAiSdkStream accumulates reasoning-delta events into a reasoning field (streamed via onUpdate with text/tools); store message carries reasoning.
  • components/ui/Reasoning.tsx — collapsible "thinking" block (React Native take on AI Elements' Reasoning, web-only), rendered above the answer when present.
  • The current ObjectStack agent emits no reasoning events, so this stays invisible until a reasoning-capable model is wired server-side — zero behavior change today, ready when it lands.

Tests

  • reasoning parsing (reasoning-delta accumulation), Reasoning component (collapsed → expand), rename dialog (drawer → dialog → Save calls renameConversation), store rename (optimistic update + blank-title guard), reasoning render in a message.
  • npm run lint 0 errors; jest 1266/1266 (154 suites).

Not done (needs your hardware)

Real-device visual verification (iOS/Android) — can't run a simulator here. Everything is unit/integration-tested; the visuals are standard NativeWind.

🤖 Generated with Claude Code

Completes the remaining AI-assistant polish items.

Rename:
- lib/ai-conversations.renameConversation already existed; store gains a
  renameConversation action (optimistic list update + PATCH) exposed via
  useAIChat. The drawer gets a pencil affordance per conversation that
  opens a rename dialog (Dialog + TextInput + Save/Cancel).

Reasoning (build-ready):
- parseAiSdkStream now accumulates `reasoning-delta` events into a
  `reasoning` field (streamed via onUpdate alongside text/tools); the store
  message carries `reasoning`.
- components/ui/Reasoning.tsx — collapsible "thinking" block (AI Elements-
  style), rendered above the answer when present. The current ObjectStack
  agent emits no reasoning, so it stays invisible until a reasoning-capable
  model is wired server-side — no behavior change today.

+8 tests (reasoning parsing, Reasoning component, rename dialog + store
rename optimistic/blank-guard, reasoning render). Suite 1266/1266, lint clean.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@os-zhuang
os-zhuang merged commit 01de8bc into main Jun 10, 2026
@os-zhuang
os-zhuang deleted the feat/ai-rename-reasoning branch June 10, 2026 11:36
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