Files
supabase/apps
Saxon Fletcher 2f8181b8bb refactor: decouple assistant chat surfaces (#48973)
## Summary

- extract the reusable assistant conversation body from the sidebar
interface
- drive shared chat rendering and mutations with an explicit chat ID
- keep sidebar selection, shortcuts, SQL-editor context, and header
controls in the sidebar wrapper
- add selection-free chat creation and branching primitives while
preserving existing sidebar helpers
- add store tests for cross-surface selection and mutation isolation

This is PR 1 of 3. Review this foundation first, then #49031 for the
routed Explorer chat lifecycle, followed by #49032 for discovery and
cross-surface entry points.

Supersedes #48970 after renaming the branch to use the repository's
`chore/` convention.

## Test plan

- `mise exec node@22 -- pnpm --dir apps/studio exec tsc --noEmit`
- `mise exec node@22 -- pnpm --dir apps/studio exec vitest run
state/ai-assistant-state.test.ts`
- ESLint on changed files
- Prettier on changed files
2026-08-13 16:00:39 +10:00
..