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:
@@ -7,7 +7,7 @@ import { route, current, navigate } from './router.js';
|
||||
import { renderSidebar } from './components/sidebar.js';
|
||||
import { renderTopbar } from './components/topbar.js';
|
||||
import { renderRightrail } from './components/rightrail.js';
|
||||
import { emit } from './state.js';
|
||||
import { emit, state } from './state.js';
|
||||
import { el, mount } from './dom.js';
|
||||
import { attachDropzone } from './components/dropzone.js';
|
||||
|
||||
@@ -25,6 +25,17 @@ const VIEWS = {
|
||||
};
|
||||
|
||||
async function renderView(ctx) {
|
||||
// Update cross-component state so the right rail knows the active Space + view.
|
||||
if (ctx.name === 'space') {
|
||||
state.spaceId = ctx.params.id || null;
|
||||
state.view = null;
|
||||
} else if (ctx.name === 'project' || ctx.name === 'page' || ctx.name === 'ref' || ctx.name === 'resource') {
|
||||
// Keep the last known spaceId; update the focused entity.
|
||||
state.view = { entityType: ctx.name, entityId: ctx.params.id || null };
|
||||
} else {
|
||||
state.view = null;
|
||||
}
|
||||
|
||||
const main = document.getElementById('main');
|
||||
const loader = VIEWS[ctx.name] || VIEWS.home;
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user