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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user