feat(ui): right-rail companion chat — streaming, tool chips, inline drafts

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
root
2026-06-01 19:34:27 +10:00
parent 19a20ba083
commit f49282b00c
5 changed files with 188 additions and 17 deletions

View File

@@ -1,5 +1,12 @@
// Tiny event bus for cross-component state (pending count, agent toggle, etc.).
// No reactive framework — just publish/subscribe with last-value semantics.
//
// `state` is a plain mutable object for values that don't need subscriptions.
// Set by the app router on each navigation; read by components like the rail.
export const state = {
spaceId: null, // string | null — ID of the currently active Space
view: null, // { entityType, entityId } | null — entity focused in main panel
};
const subs = new Map(); // event → Set<fn>
const last = new Map(); // event → last value