Release 0.1.1 #3
@@ -513,8 +513,9 @@ export function renderAttachmentChips(host, attachments, { removable = false } =
|
|||||||
* across re-renders, so a user-expanded block stays open while tokens stream
|
* across re-renders, so a user-expanded block stays open while tokens stream
|
||||||
* into it (live) and in past history items alike.
|
* into it (live) and in past history items alike.
|
||||||
*/
|
*/
|
||||||
function renderReasoning(msg) {
|
function renderReasoning(host, msg) {
|
||||||
if (!msg.reasoning) return nothing;
|
if (!msg.reasoning) return nothing;
|
||||||
|
if (host?._me?.ui_mode === 'simple') return nothing;
|
||||||
return html`
|
return html`
|
||||||
<details class="reasoning-block ${msg.streaming ? 'reasoning-block--live' : ''}">
|
<details class="reasoning-block ${msg.streaming ? 'reasoning-block--live' : ''}">
|
||||||
<summary>${t('chat.reasoning')}</summary>
|
<summary>${t('chat.reasoning')}</summary>
|
||||||
@@ -531,7 +532,7 @@ export function renderMsg(host, msg) {
|
|||||||
return html`
|
return html`
|
||||||
<div class="copilot-msg assistant copilot-markdown ${msg.failed ? 'copilot-msg--failed' : ''}">
|
<div class="copilot-msg assistant copilot-markdown ${msg.failed ? 'copilot-msg--failed' : ''}">
|
||||||
${msg.failed ? failedBadge() : nothing}
|
${msg.failed ? failedBadge() : nothing}
|
||||||
${renderReasoning(msg)}
|
${renderReasoning(host, msg)}
|
||||||
${unsafeHTML(renderMarkdown(msg.content))}
|
${unsafeHTML(renderMarkdown(msg.content))}
|
||||||
${msg.input_tokens != null ? html`<div class="copilot-token-count">↑${msg.input_tokens.toLocaleString()} tok ↓${msg.output_tokens?.toLocaleString()} tok</div>` : nothing}
|
${msg.input_tokens != null ? html`<div class="copilot-token-count">↑${msg.input_tokens.toLocaleString()} tok ↓${msg.output_tokens?.toLocaleString()} tok</div>` : nothing}
|
||||||
</div>`;
|
</div>`;
|
||||||
@@ -539,7 +540,7 @@ export function renderMsg(host, msg) {
|
|||||||
return html`
|
return html`
|
||||||
<div class="copilot-msg assistant copilot-markdown ${msg.failed ? 'copilot-msg--failed' : ''}">
|
<div class="copilot-msg assistant copilot-markdown ${msg.failed ? 'copilot-msg--failed' : ''}">
|
||||||
${msg.failed ? failedBadge() : nothing}
|
${msg.failed ? failedBadge() : nothing}
|
||||||
${renderReasoning(msg)}
|
${renderReasoning(host, msg)}
|
||||||
${unsafeHTML(renderMarkdown(msg.content))}
|
${unsafeHTML(renderMarkdown(msg.content))}
|
||||||
${msg.streaming ? html`<span class="stream-caret"></span>` : nothing}
|
${msg.streaming ? html`<span class="stream-caret"></span>` : nothing}
|
||||||
${msg.input_tokens != null && !msg.streaming ? html`<div class="copilot-token-count">↑${msg.input_tokens.toLocaleString()} tok ↓${msg.output_tokens?.toLocaleString()} tok</div>` : nothing}
|
${msg.input_tokens != null && !msg.streaming ? html`<div class="copilot-token-count">↑${msg.input_tokens.toLocaleString()} tok ↓${msg.output_tokens?.toLocaleString()} tok</div>` : nothing}
|
||||||
|
|||||||
@@ -62,6 +62,11 @@ const GROUPS = [
|
|||||||
|
|
||||||
const COLLAPSE_KEY = 'sidebar-collapsed';
|
const COLLAPSE_KEY = 'sidebar-collapsed';
|
||||||
|
|
||||||
|
// The projects NAV entry, surfaced in the simplified interface too (projects are
|
||||||
|
// membership-gated, not capability-gated, so a simple-mode member can own/share
|
||||||
|
// them just like anyone else).
|
||||||
|
const PROJECTS_NAV = NAV.find((i) => i.id === 'projects');
|
||||||
|
|
||||||
|
|
||||||
export class AppSidebar extends I18nMixin(LightElement) {
|
export class AppSidebar extends I18nMixin(LightElement) {
|
||||||
static properties = {
|
static properties = {
|
||||||
@@ -437,7 +442,8 @@ export class AppSidebar extends I18nMixin(LightElement) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
// Simplified interface (role attrs `ui_mode: "simple"`): chat + inbox only,
|
// Simplified interface (role attrs `ui_mode: "simple"`): chat, inbox and
|
||||||
|
// projects (self-service workspaces — membership-gated, not capability-gated),
|
||||||
// ungrouped. Hiding links is not access control — every route stays
|
// ungrouped. Hiding links is not access control — every route stays
|
||||||
// capability-gated server-side; this only shapes the nav for less technical
|
// capability-gated server-side; this only shapes the nav for less technical
|
||||||
// members.
|
// members.
|
||||||
@@ -452,7 +458,11 @@ export class AppSidebar extends I18nMixin(LightElement) {
|
|||||||
|
|
||||||
<nav class="sidebar-nav">
|
<nav class="sidebar-nav">
|
||||||
${simple
|
${simple
|
||||||
? html`${this._renderHome()}${this._renderInbox({ id: 'inbox' })}`
|
? html`
|
||||||
|
${this._renderHome()}
|
||||||
|
${this._renderInbox({ id: 'inbox' })}
|
||||||
|
${PROJECTS_NAV ? this._renderEntry({ kind: 'core', item: PROJECTS_NAV }) : nothing}
|
||||||
|
`
|
||||||
: GROUPS.map((g) => this._renderGroup(g))}
|
: GROUPS.map((g) => this._renderGroup(g))}
|
||||||
</nav>
|
</nav>
|
||||||
`;
|
`;
|
||||||
|
|||||||
Reference in New Issue
Block a user