@aceshooting/lyra-ui 4.1.0 → 4.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +52 -2
- package/custom-elements.json +1911 -104
- package/dist/ai/index.d.ts +3 -0
- package/dist/ai/index.d.ts.map +1 -0
- package/dist/ai/index.js +3 -0
- package/dist/ai/index.js.map +1 -0
- package/dist/ai/types.d.ts +3 -1
- package/dist/ai/types.d.ts.map +1 -1
- package/dist/components/agent-run/agent-run.class.d.ts +27 -1
- package/dist/components/agent-run/agent-run.class.d.ts.map +1 -1
- package/dist/components/agent-run/agent-run.class.js +120 -47
- package/dist/components/agent-run/agent-run.class.js.map +1 -1
- package/dist/components/agent-run/agent-run.styles.d.ts.map +1 -1
- package/dist/components/agent-run/agent-run.styles.js +16 -0
- package/dist/components/agent-run/agent-run.styles.js.map +1 -1
- package/dist/components/agent-workspace/agent-workspace.class.d.ts +146 -0
- package/dist/components/agent-workspace/agent-workspace.class.d.ts.map +1 -0
- package/dist/components/agent-workspace/agent-workspace.class.js +332 -0
- package/dist/components/agent-workspace/agent-workspace.class.js.map +1 -0
- package/dist/components/agent-workspace/agent-workspace.d.ts +2 -0
- package/dist/components/agent-workspace/agent-workspace.d.ts.map +1 -0
- package/dist/components/agent-workspace/agent-workspace.js +5 -0
- package/dist/components/agent-workspace/agent-workspace.js.map +1 -0
- package/dist/components/agent-workspace/agent-workspace.styles.d.ts +2 -0
- package/dist/components/agent-workspace/agent-workspace.styles.d.ts.map +1 -0
- package/dist/components/agent-workspace/agent-workspace.styles.js +134 -0
- package/dist/components/agent-workspace/agent-workspace.styles.js.map +1 -0
- package/dist/components/avatar/avatar.class.d.ts +3 -3
- package/dist/components/avatar/avatar.class.d.ts.map +1 -1
- package/dist/components/avatar/avatar.class.js +8 -10
- package/dist/components/avatar/avatar.class.js.map +1 -1
- package/dist/components/chart/chart.class.d.ts +1 -0
- package/dist/components/chart/chart.class.d.ts.map +1 -1
- package/dist/components/chart/chart.class.js +9 -3
- package/dist/components/chart/chart.class.js.map +1 -1
- package/dist/components/chat-message/chat-message.class.d.ts +9 -2
- package/dist/components/chat-message/chat-message.class.d.ts.map +1 -1
- package/dist/components/chat-message/chat-message.class.js +10 -2
- package/dist/components/chat-message/chat-message.class.js.map +1 -1
- package/dist/components/conversation-item/conversation-item.class.d.ts +8 -0
- package/dist/components/conversation-item/conversation-item.class.d.ts.map +1 -1
- package/dist/components/conversation-item/conversation-item.class.js +50 -22
- package/dist/components/conversation-item/conversation-item.class.js.map +1 -1
- package/dist/components/conversation-item/conversation-item.styles.d.ts.map +1 -1
- package/dist/components/conversation-item/conversation-item.styles.js +11 -0
- package/dist/components/conversation-item/conversation-item.styles.js.map +1 -1
- package/dist/components/csv-viewer/csv-viewer.styles.d.ts.map +1 -1
- package/dist/components/csv-viewer/csv-viewer.styles.js +8 -2
- package/dist/components/csv-viewer/csv-viewer.styles.js.map +1 -1
- package/dist/components/dashboard-grid/dashboard-grid.class.d.ts.map +1 -1
- package/dist/components/dashboard-grid/dashboard-grid.class.js +5 -6
- package/dist/components/dashboard-grid/dashboard-grid.class.js.map +1 -1
- package/dist/components/diff-view/diff-view.class.d.ts +20 -2
- package/dist/components/diff-view/diff-view.class.d.ts.map +1 -1
- package/dist/components/diff-view/diff-view.class.js +107 -13
- package/dist/components/diff-view/diff-view.class.js.map +1 -1
- package/dist/components/diff-view/diff-view.styles.d.ts.map +1 -1
- package/dist/components/diff-view/diff-view.styles.js +5 -0
- package/dist/components/diff-view/diff-view.styles.js.map +1 -1
- package/dist/components/emoji-picker/emoji-data-loader.d.ts.map +1 -1
- package/dist/components/emoji-picker/emoji-data-loader.js +1 -1
- package/dist/components/emoji-picker/emoji-data-loader.js.map +1 -1
- package/dist/components/emoji-picker/emoji-picker.class.d.ts +18 -1
- package/dist/components/emoji-picker/emoji-picker.class.d.ts.map +1 -1
- package/dist/components/emoji-picker/emoji-picker.class.js +152 -28
- package/dist/components/emoji-picker/emoji-picker.class.js.map +1 -1
- package/dist/components/emoji-picker/emoji-picker.styles.d.ts.map +1 -1
- package/dist/components/emoji-picker/emoji-picker.styles.js +26 -2
- package/dist/components/emoji-picker/emoji-picker.styles.js.map +1 -1
- package/dist/components/evaluation-run/evaluation-run.class.d.ts.map +1 -1
- package/dist/components/evaluation-run/evaluation-run.class.js +4 -0
- package/dist/components/evaluation-run/evaluation-run.class.js.map +1 -1
- package/dist/components/heatmap/heatmap.class.d.ts +14 -0
- package/dist/components/heatmap/heatmap.class.d.ts.map +1 -1
- package/dist/components/heatmap/heatmap.class.js +165 -0
- package/dist/components/heatmap/heatmap.class.js.map +1 -1
- package/dist/components/markdown/markdown-core.class.d.ts +10 -3
- package/dist/components/markdown/markdown-core.class.d.ts.map +1 -1
- package/dist/components/markdown/markdown-core.class.js +33 -4
- package/dist/components/markdown/markdown-core.class.js.map +1 -1
- package/dist/components/markdown/markdown.class.d.ts +10 -3
- package/dist/components/markdown/markdown.class.d.ts.map +1 -1
- package/dist/components/markdown/markdown.class.js +33 -4
- package/dist/components/markdown/markdown.class.js.map +1 -1
- package/dist/components/notebook-viewer/notebook-viewer.class.d.ts +9 -2
- package/dist/components/notebook-viewer/notebook-viewer.class.d.ts.map +1 -1
- package/dist/components/notebook-viewer/notebook-viewer.class.js +27 -4
- package/dist/components/notebook-viewer/notebook-viewer.class.js.map +1 -1
- package/dist/components/retrieval-search/retrieval-search.class.d.ts.map +1 -1
- package/dist/components/retrieval-search/retrieval-search.class.js +1 -0
- package/dist/components/retrieval-search/retrieval-search.class.js.map +1 -1
- package/dist/components/rubric-form/rubric-form.class.d.ts.map +1 -1
- package/dist/components/rubric-form/rubric-form.class.js +1 -0
- package/dist/components/rubric-form/rubric-form.class.js.map +1 -1
- package/dist/components/spreadsheet-viewer/spreadsheet-viewer.styles.d.ts.map +1 -1
- package/dist/components/spreadsheet-viewer/spreadsheet-viewer.styles.js +8 -2
- package/dist/components/spreadsheet-viewer/spreadsheet-viewer.styles.js.map +1 -1
- package/dist/components/thread-list/thread-list.class.d.ts +20 -2
- package/dist/components/thread-list/thread-list.class.d.ts.map +1 -1
- package/dist/components/thread-list/thread-list.class.js +33 -5
- package/dist/components/thread-list/thread-list.class.js.map +1 -1
- package/dist/components/trace-tree/trace-tree.class.d.ts.map +1 -1
- package/dist/components/trace-tree/trace-tree.class.js +3 -1
- package/dist/components/trace-tree/trace-tree.class.js.map +1 -1
- package/dist/internal/localization.d.ts +1 -1
- package/dist/internal/localization.d.ts.map +1 -1
- package/dist/internal/localization.js +14 -0
- package/dist/internal/localization.js.map +1 -1
- package/dist/internal/root-registration-allowlist.d.ts +1 -1
- package/dist/internal/root-registration-allowlist.d.ts.map +1 -1
- package/dist/internal/root-registration-allowlist.js +1 -0
- package/dist/internal/root-registration-allowlist.js.map +1 -1
- package/dist/lyra.d.ts +3 -0
- package/dist/lyra.d.ts.map +1 -1
- package/dist/lyra.js +2 -0
- package/dist/lyra.js.map +1 -1
- package/llms-full.txt +63 -12
- package/llms.txt +1 -1
- package/package.json +4 -1
- package/vscode-html-data.json +143 -8
- package/web-types.json +162 -9
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
import { type TemplateResult } from 'lit';
|
|
2
|
+
import { LyraElement } from '../../internal/lyra-element.js';
|
|
3
|
+
import type { ChatComposerStatus } from '../chat-composer/chat-composer.class.js';
|
|
4
|
+
import type { AgentRunMetric } from '../agent-run/agent-run.class.js';
|
|
5
|
+
import type { ContextInspectorSegment } from '../context-inspector/context-inspector.class.js';
|
|
6
|
+
import type { AgentRun, ChatMessage, Citation, CitationSelectEventDetail, GroundingAssessment, RetrievalChunk, RetryEventDetail } from '../../ai/types.js';
|
|
7
|
+
import type { RetrievalResultsSelectDetail } from '../retrieval-results/retrieval-results.class.js';
|
|
8
|
+
import type { ToolTimelineEntry, ToolTimelineApprovalDetail } from '../tool-timeline/tool-timeline.class.js';
|
|
9
|
+
import '../chat-viewport/chat-viewport.js';
|
|
10
|
+
import '../chat-message/chat-message.js';
|
|
11
|
+
import '../markdown/markdown.js';
|
|
12
|
+
import '../chat-composer/chat-composer.js';
|
|
13
|
+
import '../agent-run/agent-run.js';
|
|
14
|
+
import '../tool-timeline/tool-timeline.js';
|
|
15
|
+
import '../retrieval-results/retrieval-results.js';
|
|
16
|
+
import '../grounding-summary/grounding-summary.js';
|
|
17
|
+
import '../context-inspector/context-inspector.js';
|
|
18
|
+
import '../empty/empty.js';
|
|
19
|
+
export interface LyraAgentWorkspaceEventMap {
|
|
20
|
+
'lr-input': CustomEvent<{
|
|
21
|
+
value: string;
|
|
22
|
+
}>;
|
|
23
|
+
'lr-submit': CustomEvent<{
|
|
24
|
+
value: string;
|
|
25
|
+
}>;
|
|
26
|
+
'lr-stop': CustomEvent<undefined>;
|
|
27
|
+
'lr-message-retry': CustomEvent<{
|
|
28
|
+
messageId: string;
|
|
29
|
+
}>;
|
|
30
|
+
'lr-follow-change': CustomEvent<{
|
|
31
|
+
following: boolean;
|
|
32
|
+
}>;
|
|
33
|
+
'lr-retrieval-select': CustomEvent<RetrievalResultsSelectDetail>;
|
|
34
|
+
'lr-citation-select': CustomEvent<CitationSelectEventDetail>;
|
|
35
|
+
'lr-tool-approval-decide': CustomEvent<ToolTimelineApprovalDetail>;
|
|
36
|
+
'lr-cancel': CustomEvent<undefined>;
|
|
37
|
+
'lr-retry': CustomEvent<RetryEventDetail>;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* `<lr-agent-workspace>` — a responsive, controlled shell for an AI conversation and its
|
|
41
|
+
* supporting agent state. It renders the transcript and composer in the main pane, and composes
|
|
42
|
+
* existing run, tool, retrieval, grounding, and context primitives in an optional details pane.
|
|
43
|
+
*
|
|
44
|
+
* The component performs no network requests, model calls, retrieval, or persistence. Assign new
|
|
45
|
+
* data to the public properties as the host application receives updates. The `messages` fallback
|
|
46
|
+
* renders sanitized Markdown from each message's `text`; applications needing richer message
|
|
47
|
+
* content can replace that entire region with the `messages` slot. The `details` slot similarly
|
|
48
|
+
* replaces the built-in details pane while keeping the responsive shell.
|
|
49
|
+
*
|
|
50
|
+
* @customElement lr-agent-workspace
|
|
51
|
+
* @slot messages - Replaces the data-driven transcript message list.
|
|
52
|
+
* @slot details - Replaces the built-in run/tool/retrieval/grounding/context details pane.
|
|
53
|
+
* @slot composer - Replaces the built-in `<lr-chat-composer>`.
|
|
54
|
+
* @slot header-actions - Header actions such as model selection, settings, or export controls.
|
|
55
|
+
* @event lr-input - Forwarded from the built-in composer. `detail: { value }`.
|
|
56
|
+
* @event lr-submit - Forwarded from the built-in composer. `detail: { value }`.
|
|
57
|
+
* @event lr-stop - Forwarded from the built-in composer.
|
|
58
|
+
* @event lr-message-retry - A data-driven message's retry action was activated. `detail: { messageId }`.
|
|
59
|
+
* @event lr-follow-change - Forwarded from the transcript viewport. `detail: { following }`.
|
|
60
|
+
* @event lr-retrieval-select - Forwarded from the built-in retrieval results. `detail: { ids, chunks }`.
|
|
61
|
+
* @event lr-citation-select - Forwarded from the built-in grounding summary. `detail: { citation }`.
|
|
62
|
+
* @event lr-tool-approval-decide - Forwarded from the built-in tool timeline.
|
|
63
|
+
* @event lr-cancel - Forwarded from the built-in agent run.
|
|
64
|
+
* @event lr-retry - Forwarded from the built-in agent run.
|
|
65
|
+
* @csspart base - The root workspace wrapper.
|
|
66
|
+
* @csspart header - The workspace heading and header-actions slot.
|
|
67
|
+
* @csspart heading - The visible workspace heading.
|
|
68
|
+
* @csspart header-actions - The header-actions slot wrapper.
|
|
69
|
+
* @csspart body - The main conversation/details layout.
|
|
70
|
+
* @csspart conversation - The main transcript pane.
|
|
71
|
+
* @csspart viewport - The composed `<lr-chat-viewport>`.
|
|
72
|
+
* @csspart messages - The transcript message wrapper.
|
|
73
|
+
* @csspart messages-empty - The empty transcript state.
|
|
74
|
+
* @csspart details - The responsive details pane.
|
|
75
|
+
* @csspart details-content - The built-in details content wrapper.
|
|
76
|
+
* @csspart section - A built-in run, tools, retrieval, grounding, or context section.
|
|
77
|
+
* @csspart section-heading - A built-in details section heading.
|
|
78
|
+
* @csspart composer - The composer region.
|
|
79
|
+
* @csspart composer-input - The built-in `<lr-chat-composer>`.
|
|
80
|
+
*/
|
|
81
|
+
export declare class LyraAgentWorkspace extends LyraElement<LyraAgentWorkspaceEventMap> {
|
|
82
|
+
static styles: import("lit").CSSResultGroup[];
|
|
83
|
+
/** Accessible name and visible heading for the workspace. */
|
|
84
|
+
label: string;
|
|
85
|
+
/** Host-level accessible-name override for the internal `role="region"` root. */
|
|
86
|
+
accessibleLabel: string | null;
|
|
87
|
+
/** Conversation messages. The host owns ordering, updates, and persistence. */
|
|
88
|
+
messages: ChatMessage[];
|
|
89
|
+
/** Current agent run, rendered in the details pane when set. */
|
|
90
|
+
run: AgentRun | null;
|
|
91
|
+
/** Additional metrics forwarded to `<lr-agent-run>`, such as token counts or latency. */
|
|
92
|
+
metrics: AgentRunMetric[];
|
|
93
|
+
/** Tool calls for the current run, rendered through `<lr-tool-timeline>`. */
|
|
94
|
+
tools: ToolTimelineEntry[];
|
|
95
|
+
/** Retrieval chunks for the current answer or query. */
|
|
96
|
+
retrievalChunks: RetrievalChunk[];
|
|
97
|
+
/** Controlled retrieval selection, forwarded to `<lr-retrieval-results>`. */
|
|
98
|
+
selectedRetrievalIds: string[];
|
|
99
|
+
/** Loading state for the built-in retrieval result list. */
|
|
100
|
+
retrievalLoading: boolean;
|
|
101
|
+
/** Whether more retrieval results can be requested. */
|
|
102
|
+
retrievalHasMore: boolean;
|
|
103
|
+
/** Caller-supplied retrieval error text. */
|
|
104
|
+
retrievalError: string;
|
|
105
|
+
/** Grounding assessment for the current assistant answer. */
|
|
106
|
+
groundingAssessment: GroundingAssessment | null;
|
|
107
|
+
/** Citations displayed with the grounding summary. */
|
|
108
|
+
citations: Citation[];
|
|
109
|
+
/** Final model-call context segments. */
|
|
110
|
+
contextSegments: ContextInspectorSegment[];
|
|
111
|
+
/** Overall context-window token total. */
|
|
112
|
+
contextTotal: number;
|
|
113
|
+
/** Whether the transcript follows the latest message. */
|
|
114
|
+
follow: boolean;
|
|
115
|
+
/** First unread message index, forwarded to the transcript viewport. */
|
|
116
|
+
unreadStartIndex: number | null;
|
|
117
|
+
/** Whether the built-in details pane is available when data is present. */
|
|
118
|
+
showDetails: boolean;
|
|
119
|
+
/** Whether the built-in composer is available when no `composer` slot is supplied. */
|
|
120
|
+
showComposer: boolean;
|
|
121
|
+
/** Controlled value of the built-in composer. */
|
|
122
|
+
composerValue: string;
|
|
123
|
+
/** Status of the built-in composer. */
|
|
124
|
+
composerStatus: ChatComposerStatus;
|
|
125
|
+
/** Placeholder for the built-in composer. */
|
|
126
|
+
composerPlaceholder: string;
|
|
127
|
+
/** Minimum and maximum rows for the built-in composer. */
|
|
128
|
+
composerMinRows: number;
|
|
129
|
+
composerMaxRows: number;
|
|
130
|
+
private hasSlotted;
|
|
131
|
+
private onComposerInput;
|
|
132
|
+
private onFollowChange;
|
|
133
|
+
private onRetrievalSelect;
|
|
134
|
+
private onMessageRetry;
|
|
135
|
+
private renderMessage;
|
|
136
|
+
private renderMessages;
|
|
137
|
+
private renderDetails;
|
|
138
|
+
private get hasBuiltInDetails();
|
|
139
|
+
render(): TemplateResult;
|
|
140
|
+
}
|
|
141
|
+
declare global {
|
|
142
|
+
interface HTMLElementTagNameMap {
|
|
143
|
+
'lr-agent-workspace': LyraAgentWorkspace;
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
//# sourceMappingURL=agent-workspace.class.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agent-workspace.class.d.ts","sourceRoot":"","sources":["../../../src/components/agent-workspace/agent-workspace.class.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,KAAK,cAAc,EAAE,MAAM,KAAK,CAAC;AAGzD,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAC7D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yCAAyC,CAAC;AAClF,OAAO,KAAK,EAAE,cAAc,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AK;IACpB,eAAe,SAAK;IAEhF,OAAO,CAAC,UAAU;IAIlB,OAAO,CAAC,eAAe,CAErB;IAEF,OAAO,CAAC,cAAc,CAEpB;IAEF,OAAO,CAAC,iBAAiB,CAEvB;IAEF,OAAO,CAAC,cAAc,CAGpB;IAEF,OAAO,CAAC,aAAa;IAcrB,OAAO,CAAC,cAAc;IAOtB,OAAO,CAAC,aAAa;IAkDrB,OAAO,KAAK,iBAAiB,GAW5B;IAED,MAAM,IAAI,cAAc,CA+CvB;CACF;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,oBAAoB,EAAE,kBAAkB,CAAC;KAC1C;CACF"}
|
|
@@ -0,0 +1,332 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
import { html, nothing } from 'lit';
|
|
8
|
+
import { property } from 'lit/decorators.js';
|
|
9
|
+
import { repeat } from 'lit/directives/repeat.js';
|
|
10
|
+
import { LyraElement } from '../../internal/lyra-element.js';
|
|
11
|
+
import { styles } from './agent-workspace.styles.js';
|
|
12
|
+
import '../chat-viewport/chat-viewport.js';
|
|
13
|
+
import '../chat-message/chat-message.js';
|
|
14
|
+
import '../markdown/markdown.js';
|
|
15
|
+
import '../chat-composer/chat-composer.js';
|
|
16
|
+
import '../agent-run/agent-run.js';
|
|
17
|
+
import '../tool-timeline/tool-timeline.js';
|
|
18
|
+
import '../retrieval-results/retrieval-results.js';
|
|
19
|
+
import '../grounding-summary/grounding-summary.js';
|
|
20
|
+
import '../context-inspector/context-inspector.js';
|
|
21
|
+
import '../empty/empty.js';
|
|
22
|
+
/**
|
|
23
|
+
* `<lr-agent-workspace>` — a responsive, controlled shell for an AI conversation and its
|
|
24
|
+
* supporting agent state. It renders the transcript and composer in the main pane, and composes
|
|
25
|
+
* existing run, tool, retrieval, grounding, and context primitives in an optional details pane.
|
|
26
|
+
*
|
|
27
|
+
* The component performs no network requests, model calls, retrieval, or persistence. Assign new
|
|
28
|
+
* data to the public properties as the host application receives updates. The `messages` fallback
|
|
29
|
+
* renders sanitized Markdown from each message's `text`; applications needing richer message
|
|
30
|
+
* content can replace that entire region with the `messages` slot. The `details` slot similarly
|
|
31
|
+
* replaces the built-in details pane while keeping the responsive shell.
|
|
32
|
+
*
|
|
33
|
+
* @customElement lr-agent-workspace
|
|
34
|
+
* @slot messages - Replaces the data-driven transcript message list.
|
|
35
|
+
* @slot details - Replaces the built-in run/tool/retrieval/grounding/context details pane.
|
|
36
|
+
* @slot composer - Replaces the built-in `<lr-chat-composer>`.
|
|
37
|
+
* @slot header-actions - Header actions such as model selection, settings, or export controls.
|
|
38
|
+
* @event lr-input - Forwarded from the built-in composer. `detail: { value }`.
|
|
39
|
+
* @event lr-submit - Forwarded from the built-in composer. `detail: { value }`.
|
|
40
|
+
* @event lr-stop - Forwarded from the built-in composer.
|
|
41
|
+
* @event lr-message-retry - A data-driven message's retry action was activated. `detail: { messageId }`.
|
|
42
|
+
* @event lr-follow-change - Forwarded from the transcript viewport. `detail: { following }`.
|
|
43
|
+
* @event lr-retrieval-select - Forwarded from the built-in retrieval results. `detail: { ids, chunks }`.
|
|
44
|
+
* @event lr-citation-select - Forwarded from the built-in grounding summary. `detail: { citation }`.
|
|
45
|
+
* @event lr-tool-approval-decide - Forwarded from the built-in tool timeline.
|
|
46
|
+
* @event lr-cancel - Forwarded from the built-in agent run.
|
|
47
|
+
* @event lr-retry - Forwarded from the built-in agent run.
|
|
48
|
+
* @csspart base - The root workspace wrapper.
|
|
49
|
+
* @csspart header - The workspace heading and header-actions slot.
|
|
50
|
+
* @csspart heading - The visible workspace heading.
|
|
51
|
+
* @csspart header-actions - The header-actions slot wrapper.
|
|
52
|
+
* @csspart body - The main conversation/details layout.
|
|
53
|
+
* @csspart conversation - The main transcript pane.
|
|
54
|
+
* @csspart viewport - The composed `<lr-chat-viewport>`.
|
|
55
|
+
* @csspart messages - The transcript message wrapper.
|
|
56
|
+
* @csspart messages-empty - The empty transcript state.
|
|
57
|
+
* @csspart details - The responsive details pane.
|
|
58
|
+
* @csspart details-content - The built-in details content wrapper.
|
|
59
|
+
* @csspart section - A built-in run, tools, retrieval, grounding, or context section.
|
|
60
|
+
* @csspart section-heading - A built-in details section heading.
|
|
61
|
+
* @csspart composer - The composer region.
|
|
62
|
+
* @csspart composer-input - The built-in `<lr-chat-composer>`.
|
|
63
|
+
*/
|
|
64
|
+
export class LyraAgentWorkspace extends LyraElement {
|
|
65
|
+
constructor() {
|
|
66
|
+
super(...arguments);
|
|
67
|
+
/** Accessible name and visible heading for the workspace. */
|
|
68
|
+
this.label = '';
|
|
69
|
+
/** Host-level accessible-name override for the internal `role="region"` root. */
|
|
70
|
+
this.accessibleLabel = null;
|
|
71
|
+
/** Conversation messages. The host owns ordering, updates, and persistence. */
|
|
72
|
+
this.messages = [];
|
|
73
|
+
/** Current agent run, rendered in the details pane when set. */
|
|
74
|
+
this.run = null;
|
|
75
|
+
/** Additional metrics forwarded to `<lr-agent-run>`, such as token counts or latency. */
|
|
76
|
+
this.metrics = [];
|
|
77
|
+
/** Tool calls for the current run, rendered through `<lr-tool-timeline>`. */
|
|
78
|
+
this.tools = [];
|
|
79
|
+
/** Retrieval chunks for the current answer or query. */
|
|
80
|
+
this.retrievalChunks = [];
|
|
81
|
+
/** Controlled retrieval selection, forwarded to `<lr-retrieval-results>`. */
|
|
82
|
+
this.selectedRetrievalIds = [];
|
|
83
|
+
/** Loading state for the built-in retrieval result list. */
|
|
84
|
+
this.retrievalLoading = false;
|
|
85
|
+
/** Whether more retrieval results can be requested. */
|
|
86
|
+
this.retrievalHasMore = false;
|
|
87
|
+
/** Caller-supplied retrieval error text. */
|
|
88
|
+
this.retrievalError = '';
|
|
89
|
+
/** Grounding assessment for the current assistant answer. */
|
|
90
|
+
this.groundingAssessment = null;
|
|
91
|
+
/** Citations displayed with the grounding summary. */
|
|
92
|
+
this.citations = [];
|
|
93
|
+
/** Final model-call context segments. */
|
|
94
|
+
this.contextSegments = [];
|
|
95
|
+
/** Overall context-window token total. */
|
|
96
|
+
this.contextTotal = 0;
|
|
97
|
+
/** Whether the transcript follows the latest message. */
|
|
98
|
+
this.follow = true;
|
|
99
|
+
/** First unread message index, forwarded to the transcript viewport. */
|
|
100
|
+
this.unreadStartIndex = null;
|
|
101
|
+
/** Whether the built-in details pane is available when data is present. */
|
|
102
|
+
this.showDetails = true;
|
|
103
|
+
/** Whether the built-in composer is available when no `composer` slot is supplied. */
|
|
104
|
+
this.showComposer = true;
|
|
105
|
+
/** Controlled value of the built-in composer. */
|
|
106
|
+
this.composerValue = '';
|
|
107
|
+
/** Status of the built-in composer. */
|
|
108
|
+
this.composerStatus = 'idle';
|
|
109
|
+
/** Placeholder for the built-in composer. */
|
|
110
|
+
this.composerPlaceholder = '';
|
|
111
|
+
/** Minimum and maximum rows for the built-in composer. */
|
|
112
|
+
this.composerMinRows = 1;
|
|
113
|
+
this.composerMaxRows = 8;
|
|
114
|
+
this.onComposerInput = (event) => {
|
|
115
|
+
this.composerValue = event.detail.value;
|
|
116
|
+
};
|
|
117
|
+
this.onFollowChange = (event) => {
|
|
118
|
+
this.follow = event.detail.following;
|
|
119
|
+
};
|
|
120
|
+
this.onRetrievalSelect = (event) => {
|
|
121
|
+
this.selectedRetrievalIds = event.detail.ids;
|
|
122
|
+
};
|
|
123
|
+
this.onMessageRetry = (event) => {
|
|
124
|
+
event.stopPropagation();
|
|
125
|
+
if (event.detail.messageId)
|
|
126
|
+
this.emit('lr-message-retry', { messageId: event.detail.messageId });
|
|
127
|
+
};
|
|
128
|
+
}
|
|
129
|
+
static { this.styles = [LyraElement.styles, styles]; }
|
|
130
|
+
hasSlotted(name) {
|
|
131
|
+
return Array.from(this.children).some((element) => element.getAttribute('slot') === name);
|
|
132
|
+
}
|
|
133
|
+
renderMessage(message) {
|
|
134
|
+
return html `
|
|
135
|
+
<lr-chat-message
|
|
136
|
+
.role=${message.role}
|
|
137
|
+
.messageId=${message.id}
|
|
138
|
+
.status=${message.status ?? 'sent'}
|
|
139
|
+
.timestamp=${message.timestamp}
|
|
140
|
+
@lr-retry=${this.onMessageRetry}
|
|
141
|
+
>
|
|
142
|
+
<lr-markdown .content=${message.text ?? ''}></lr-markdown>
|
|
143
|
+
</lr-chat-message>
|
|
144
|
+
`;
|
|
145
|
+
}
|
|
146
|
+
renderMessages() {
|
|
147
|
+
if (this.messages.length === 0) {
|
|
148
|
+
return html `<lr-empty part="messages-empty" heading=${this.localize('agentWorkspaceEmpty')}></lr-empty>`;
|
|
149
|
+
}
|
|
150
|
+
return html `${repeat(this.messages, (message) => message.id, (message) => this.renderMessage(message))}`;
|
|
151
|
+
}
|
|
152
|
+
renderDetails() {
|
|
153
|
+
return html `
|
|
154
|
+
<div part="details-content">
|
|
155
|
+
${this.run
|
|
156
|
+
? html `<section part="section">
|
|
157
|
+
<h3 part="section-heading">${this.localize('agentWorkspaceRun')}</h3>
|
|
158
|
+
<lr-agent-run .run=${this.run} .metrics=${this.metrics}></lr-agent-run>
|
|
159
|
+
</section>`
|
|
160
|
+
: nothing}
|
|
161
|
+
${this.tools.length > 0
|
|
162
|
+
? html `<section part="section">
|
|
163
|
+
<h3 part="section-heading">${this.localize('agentWorkspaceTools')}</h3>
|
|
164
|
+
<lr-tool-timeline .entries=${this.tools}></lr-tool-timeline>
|
|
165
|
+
</section>`
|
|
166
|
+
: nothing}
|
|
167
|
+
${this.retrievalChunks.length > 0 || this.retrievalLoading || this.retrievalError
|
|
168
|
+
? html `<section part="section">
|
|
169
|
+
<h3 part="section-heading">${this.localize('agentWorkspaceRetrieval')}</h3>
|
|
170
|
+
<lr-retrieval-results
|
|
171
|
+
.chunks=${this.retrievalChunks}
|
|
172
|
+
.selectedIds=${this.selectedRetrievalIds}
|
|
173
|
+
.loading=${this.retrievalLoading}
|
|
174
|
+
.hasMore=${this.retrievalHasMore}
|
|
175
|
+
.error=${this.retrievalError}
|
|
176
|
+
@lr-select=${this.onRetrievalSelect}
|
|
177
|
+
></lr-retrieval-results>
|
|
178
|
+
</section>`
|
|
179
|
+
: nothing}
|
|
180
|
+
${this.groundingAssessment || this.citations.length > 0
|
|
181
|
+
? html `<section part="section">
|
|
182
|
+
<h3 part="section-heading">${this.localize('agentWorkspaceGrounding')}</h3>
|
|
183
|
+
<lr-grounding-summary
|
|
184
|
+
.assessment=${this.groundingAssessment}
|
|
185
|
+
.citations=${this.citations}
|
|
186
|
+
></lr-grounding-summary>
|
|
187
|
+
</section>`
|
|
188
|
+
: nothing}
|
|
189
|
+
${this.contextSegments.length > 0
|
|
190
|
+
? html `<section part="section">
|
|
191
|
+
<h3 part="section-heading">${this.localize('agentWorkspaceContext')}</h3>
|
|
192
|
+
<lr-context-inspector
|
|
193
|
+
.segments=${this.contextSegments}
|
|
194
|
+
.total=${this.contextTotal}
|
|
195
|
+
></lr-context-inspector>
|
|
196
|
+
</section>`
|
|
197
|
+
: nothing}
|
|
198
|
+
</div>
|
|
199
|
+
`;
|
|
200
|
+
}
|
|
201
|
+
get hasBuiltInDetails() {
|
|
202
|
+
return Boolean(this.run ||
|
|
203
|
+
this.tools.length > 0 ||
|
|
204
|
+
this.retrievalChunks.length > 0 ||
|
|
205
|
+
this.retrievalLoading ||
|
|
206
|
+
this.retrievalError ||
|
|
207
|
+
this.groundingAssessment ||
|
|
208
|
+
this.citations.length > 0 ||
|
|
209
|
+
this.contextSegments.length > 0);
|
|
210
|
+
}
|
|
211
|
+
render() {
|
|
212
|
+
const label = this.accessibleLabel || this.label || this.localize('agentWorkspaceLabel');
|
|
213
|
+
const heading = this.label || this.localize('agentWorkspaceLabel');
|
|
214
|
+
const hasDetails = this.showDetails && (this.hasSlotted('details') || this.hasBuiltInDetails);
|
|
215
|
+
return html `
|
|
216
|
+
<div part="base" role="region" aria-label=${label}>
|
|
217
|
+
<div part="header">
|
|
218
|
+
<h2 part="heading">${heading}</h2>
|
|
219
|
+
<span part="header-actions"><slot name="header-actions"></slot></span>
|
|
220
|
+
</div>
|
|
221
|
+
<div part="body" data-details=${hasDetails ? 'true' : 'false'}>
|
|
222
|
+
<section part="conversation" aria-label=${this.localize('agentWorkspaceConversation')}>
|
|
223
|
+
<lr-chat-viewport
|
|
224
|
+
part="viewport"
|
|
225
|
+
.follow=${this.follow}
|
|
226
|
+
.unreadStartIndex=${this.unreadStartIndex}
|
|
227
|
+
aria-label=${this.localize('agentWorkspaceConversation')}
|
|
228
|
+
@lr-follow-change=${this.onFollowChange}
|
|
229
|
+
>
|
|
230
|
+
<div part="messages">
|
|
231
|
+
<slot name="messages">${this.renderMessages()}</slot>
|
|
232
|
+
</div>
|
|
233
|
+
</lr-chat-viewport>
|
|
234
|
+
</section>
|
|
235
|
+
${hasDetails
|
|
236
|
+
? html `<aside part="details" aria-label=${this.localize('agentWorkspaceDetails')}>
|
|
237
|
+
<slot name="details">${this.renderDetails()}</slot>
|
|
238
|
+
</aside>`
|
|
239
|
+
: nothing}
|
|
240
|
+
</div>
|
|
241
|
+
${this.showComposer
|
|
242
|
+
? html `<div part="composer">
|
|
243
|
+
<slot name="composer">
|
|
244
|
+
<lr-chat-composer
|
|
245
|
+
part="composer-input"
|
|
246
|
+
.value=${this.composerValue}
|
|
247
|
+
.status=${this.composerStatus}
|
|
248
|
+
.minRows=${this.composerMinRows}
|
|
249
|
+
.maxRows=${this.composerMaxRows}
|
|
250
|
+
placeholder=${this.composerPlaceholder || this.localize('composerPlaceholder')}
|
|
251
|
+
@lr-input=${this.onComposerInput}
|
|
252
|
+
></lr-chat-composer>
|
|
253
|
+
</slot>
|
|
254
|
+
</div>`
|
|
255
|
+
: nothing}
|
|
256
|
+
</div>
|
|
257
|
+
`;
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
__decorate([
|
|
261
|
+
property()
|
|
262
|
+
], LyraAgentWorkspace.prototype, "label", void 0);
|
|
263
|
+
__decorate([
|
|
264
|
+
property({ attribute: 'aria-label' })
|
|
265
|
+
], LyraAgentWorkspace.prototype, "accessibleLabel", void 0);
|
|
266
|
+
__decorate([
|
|
267
|
+
property({ attribute: false })
|
|
268
|
+
], LyraAgentWorkspace.prototype, "messages", void 0);
|
|
269
|
+
__decorate([
|
|
270
|
+
property({ attribute: false })
|
|
271
|
+
], LyraAgentWorkspace.prototype, "run", void 0);
|
|
272
|
+
__decorate([
|
|
273
|
+
property({ attribute: false })
|
|
274
|
+
], LyraAgentWorkspace.prototype, "metrics", void 0);
|
|
275
|
+
__decorate([
|
|
276
|
+
property({ attribute: false })
|
|
277
|
+
], LyraAgentWorkspace.prototype, "tools", void 0);
|
|
278
|
+
__decorate([
|
|
279
|
+
property({ attribute: false })
|
|
280
|
+
], LyraAgentWorkspace.prototype, "retrievalChunks", void 0);
|
|
281
|
+
__decorate([
|
|
282
|
+
property({ attribute: false })
|
|
283
|
+
], LyraAgentWorkspace.prototype, "selectedRetrievalIds", void 0);
|
|
284
|
+
__decorate([
|
|
285
|
+
property({ type: Boolean, attribute: 'retrieval-loading' })
|
|
286
|
+
], LyraAgentWorkspace.prototype, "retrievalLoading", void 0);
|
|
287
|
+
__decorate([
|
|
288
|
+
property({ type: Boolean, attribute: 'retrieval-has-more' })
|
|
289
|
+
], LyraAgentWorkspace.prototype, "retrievalHasMore", void 0);
|
|
290
|
+
__decorate([
|
|
291
|
+
property({ attribute: 'retrieval-error' })
|
|
292
|
+
], LyraAgentWorkspace.prototype, "retrievalError", void 0);
|
|
293
|
+
__decorate([
|
|
294
|
+
property({ attribute: false })
|
|
295
|
+
], LyraAgentWorkspace.prototype, "groundingAssessment", void 0);
|
|
296
|
+
__decorate([
|
|
297
|
+
property({ attribute: false })
|
|
298
|
+
], LyraAgentWorkspace.prototype, "citations", void 0);
|
|
299
|
+
__decorate([
|
|
300
|
+
property({ attribute: false })
|
|
301
|
+
], LyraAgentWorkspace.prototype, "contextSegments", void 0);
|
|
302
|
+
__decorate([
|
|
303
|
+
property({ type: Number, attribute: 'context-total' })
|
|
304
|
+
], LyraAgentWorkspace.prototype, "contextTotal", void 0);
|
|
305
|
+
__decorate([
|
|
306
|
+
property({ type: Boolean, reflect: true })
|
|
307
|
+
], LyraAgentWorkspace.prototype, "follow", void 0);
|
|
308
|
+
__decorate([
|
|
309
|
+
property({ type: Number, attribute: 'unread-start-index' })
|
|
310
|
+
], LyraAgentWorkspace.prototype, "unreadStartIndex", void 0);
|
|
311
|
+
__decorate([
|
|
312
|
+
property({ type: Boolean, attribute: 'show-details', reflect: true })
|
|
313
|
+
], LyraAgentWorkspace.prototype, "showDetails", void 0);
|
|
314
|
+
__decorate([
|
|
315
|
+
property({ type: Boolean, attribute: 'show-composer', reflect: true })
|
|
316
|
+
], LyraAgentWorkspace.prototype, "showComposer", void 0);
|
|
317
|
+
__decorate([
|
|
318
|
+
property({ attribute: 'composer-value' })
|
|
319
|
+
], LyraAgentWorkspace.prototype, "composerValue", void 0);
|
|
320
|
+
__decorate([
|
|
321
|
+
property({ attribute: 'composer-status' })
|
|
322
|
+
], LyraAgentWorkspace.prototype, "composerStatus", void 0);
|
|
323
|
+
__decorate([
|
|
324
|
+
property({ attribute: 'composer-placeholder' })
|
|
325
|
+
], LyraAgentWorkspace.prototype, "composerPlaceholder", void 0);
|
|
326
|
+
__decorate([
|
|
327
|
+
property({ type: Number, attribute: 'composer-min-rows' })
|
|
328
|
+
], LyraAgentWorkspace.prototype, "composerMinRows", void 0);
|
|
329
|
+
__decorate([
|
|
330
|
+
property({ type: Number, attribute: 'composer-max-rows' })
|
|
331
|
+
], LyraAgentWorkspace.prototype, "composerMaxRows", void 0);
|
|
332
|
+
//# sourceMappingURL=agent-workspace.class.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agent-workspace.class.js","sourceRoot":"","sources":["../../../src/components/agent-workspace/agent-workspace.class.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,IAAI,EAAE,OAAO,EAAuB,MAAM,KAAK,CAAC;AACzD,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAClD,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAe7D,OAAO,EAAE,MAAM,EAAE,MAAM,6BAA6B,CAAC;AACrD,OAAO,mCAAmC,CAAC;AAC3C,OAAO,iCAAiC,CAAC;AACzC,OAAO,yBAAyB,CAAC;AACjC,OAAO,mCAAmC,CAAC;AAC3C,OAAO,2BAA2B,CAAC;AACnC,OAAO,mCAAmC,CAAC;AAC3C,OAAO,2CAA2C,CAAC;AACnD,OAAO,2CAA2C,CAAC;AACnD,OAAO,2CAA2C,CAAC;AACnD,OAAO,mBAAmB,CAAC;AAe3B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AACH,MAAM,OAAO,kBAAmB,SAAQ,WAAuC;IAA/E;;QAGE,6DAA6D;QACjD,UAAK,GAAG,EAAE,CAAC;QAEvB,iFAAiF;QAC1C,oBAAe,GAAkB,IAAI,CAAC;QAE7E,+EAA+E;QAC/C,aAAQ,GAAkB,EAAE,CAAC;QAE7D,gEAAgE;QAChC,QAAG,GAAoB,IAAI,CAAC;QAE5D,yFAAyF;QACzD,YAAO,GAAqB,EAAE,CAAC;QAE/D,6EAA6E;QAC7C,UAAK,GAAwB,EAAE,CAAC;QAEhE,wDAAwD;QACxB,oBAAe,GAAqB,EAAE,CAAC;QAEvE,6EAA6E;QAC7C,yBAAoB,GAAa,EAAE,CAAC;QAEpE,4DAA4D;QACC,qBAAgB,GAA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EAAE,CAAC;wDAAkB;AAG7B;IAA3C,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;kDAAe;AAGG;IAA5D,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,oBAAoB,EAAE,CAAC;4DAAwC;AAG7B;IAAtE,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;uDAAoB;AAGlB;IAAvE,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;wDAAqB;AAGjD;IAA1C,QAAQ,CAAC,EAAE,SAAS,EAAE,gBAAgB,EAAE,CAAC;yDAAoB;AAGlB;IAA3C,QAAQ,CAAC,EAAE,SAAS,EAAE,iBAAiB,EAAE,CAAC;0DAA6C;AAGvC;IAAhD,QAAQ,CAAC,EAAE,SAAS,EAAE,sBAAsB,EAAE,CAAC;+DAA0B;AAGd;IAA3D,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,mBAAmB,EAAE,CAAC;2DAAqB;AACpB;IAA3D,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,mBAAmB,EAAE,CAAC;2DAAqB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agent-workspace.d.ts","sourceRoot":"","sources":["../../../src/components/agent-workspace/agent-workspace.ts"],"names":[],"mappings":"AAAA,cAAc,4BAA4B,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export * from './agent-workspace.class.js';
|
|
2
|
+
import { LyraAgentWorkspace } from './agent-workspace.class.js';
|
|
3
|
+
import { defineElement } from '../../internal/prefix.js';
|
|
4
|
+
defineElement('agent-workspace', LyraAgentWorkspace);
|
|
5
|
+
//# sourceMappingURL=agent-workspace.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agent-workspace.js","sourceRoot":"","sources":["../../../src/components/agent-workspace/agent-workspace.ts"],"names":[],"mappings":"AAAA,cAAc,4BAA4B,CAAC;AAC3C,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAEzD,aAAa,CAAC,iBAAiB,EAAE,kBAAkB,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agent-workspace.styles.d.ts","sourceRoot":"","sources":["../../../src/components/agent-workspace/agent-workspace.styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,MAAM,yBAmIlB,CAAC"}
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
import { css } from 'lit';
|
|
2
|
+
export const styles = css `
|
|
3
|
+
:host {
|
|
4
|
+
display: block;
|
|
5
|
+
min-inline-size: 0;
|
|
6
|
+
min-block-size: 0;
|
|
7
|
+
block-size: 100%;
|
|
8
|
+
container-type: inline-size;
|
|
9
|
+
}
|
|
10
|
+
[part='base'] {
|
|
11
|
+
display: grid;
|
|
12
|
+
grid-template-rows: auto minmax(0, 1fr) auto;
|
|
13
|
+
min-inline-size: 0;
|
|
14
|
+
min-block-size: 0;
|
|
15
|
+
block-size: 100%;
|
|
16
|
+
overflow: hidden;
|
|
17
|
+
border: var(--lr-border-width-thin) solid var(--lr-color-border);
|
|
18
|
+
border-radius: var(--lr-radius);
|
|
19
|
+
background: var(--lr-color-surface);
|
|
20
|
+
color: var(--lr-color-text);
|
|
21
|
+
}
|
|
22
|
+
[part='header'] {
|
|
23
|
+
display: flex;
|
|
24
|
+
align-items: center;
|
|
25
|
+
flex-wrap: wrap;
|
|
26
|
+
gap: var(--lr-space-s);
|
|
27
|
+
min-inline-size: 0;
|
|
28
|
+
padding: var(--lr-space-s) var(--lr-space-m);
|
|
29
|
+
border-block-end: var(--lr-border-width-thin) solid var(--lr-color-border);
|
|
30
|
+
}
|
|
31
|
+
[part='heading'] {
|
|
32
|
+
min-inline-size: 0;
|
|
33
|
+
margin: 0;
|
|
34
|
+
font-size: var(--lr-font-size-md);
|
|
35
|
+
font-weight: var(--lr-font-weight-semibold);
|
|
36
|
+
overflow-wrap: anywhere;
|
|
37
|
+
}
|
|
38
|
+
[part='header-actions'] {
|
|
39
|
+
display: flex;
|
|
40
|
+
align-items: center;
|
|
41
|
+
flex-wrap: wrap;
|
|
42
|
+
gap: var(--lr-space-xs);
|
|
43
|
+
margin-inline-start: auto;
|
|
44
|
+
}
|
|
45
|
+
[part='body'] {
|
|
46
|
+
display: grid;
|
|
47
|
+
grid-template-columns: minmax(0, 1fr) minmax(var(--lr-size-16rem), var(--lr-size-24rem));
|
|
48
|
+
min-inline-size: 0;
|
|
49
|
+
min-block-size: 0;
|
|
50
|
+
}
|
|
51
|
+
[part='body'][data-details='false'] {
|
|
52
|
+
grid-template-columns: minmax(0, 1fr);
|
|
53
|
+
}
|
|
54
|
+
[part='conversation'] {
|
|
55
|
+
display: flex;
|
|
56
|
+
min-inline-size: 0;
|
|
57
|
+
min-block-size: 0;
|
|
58
|
+
}
|
|
59
|
+
[part='viewport'] {
|
|
60
|
+
flex: 1 1 auto;
|
|
61
|
+
min-inline-size: 0;
|
|
62
|
+
min-block-size: 0;
|
|
63
|
+
}
|
|
64
|
+
[part='messages'] {
|
|
65
|
+
display: flex;
|
|
66
|
+
flex-direction: column;
|
|
67
|
+
gap: var(--lr-space-m);
|
|
68
|
+
min-inline-size: 0;
|
|
69
|
+
padding: var(--lr-space-m);
|
|
70
|
+
}
|
|
71
|
+
[part='messages-empty'] {
|
|
72
|
+
margin-block: auto;
|
|
73
|
+
}
|
|
74
|
+
[part='details'] {
|
|
75
|
+
min-inline-size: 0;
|
|
76
|
+
min-block-size: 0;
|
|
77
|
+
overflow: auto;
|
|
78
|
+
padding: var(--lr-space-m);
|
|
79
|
+
border-inline-start: var(--lr-border-width-thin) solid var(--lr-color-border);
|
|
80
|
+
background: var(--lr-color-surface-raised);
|
|
81
|
+
}
|
|
82
|
+
[part='details-content'] {
|
|
83
|
+
display: flex;
|
|
84
|
+
flex-direction: column;
|
|
85
|
+
gap: var(--lr-space-l);
|
|
86
|
+
min-inline-size: 0;
|
|
87
|
+
}
|
|
88
|
+
[part='section'] {
|
|
89
|
+
display: flex;
|
|
90
|
+
flex-direction: column;
|
|
91
|
+
gap: var(--lr-space-s);
|
|
92
|
+
min-inline-size: 0;
|
|
93
|
+
}
|
|
94
|
+
[part='section-heading'] {
|
|
95
|
+
margin: 0;
|
|
96
|
+
font-size: var(--lr-font-size-sm);
|
|
97
|
+
font-weight: var(--lr-font-weight-semibold);
|
|
98
|
+
}
|
|
99
|
+
[part='section'] > * {
|
|
100
|
+
min-inline-size: 0;
|
|
101
|
+
}
|
|
102
|
+
[part='composer'] {
|
|
103
|
+
min-inline-size: 0;
|
|
104
|
+
padding: var(--lr-space-s) var(--lr-space-m);
|
|
105
|
+
border-block-start: var(--lr-border-width-thin) solid var(--lr-color-border);
|
|
106
|
+
background: var(--lr-color-surface);
|
|
107
|
+
}
|
|
108
|
+
[part='composer-input'] {
|
|
109
|
+
display: block;
|
|
110
|
+
max-inline-size: var(--lr-size-48rem);
|
|
111
|
+
margin-inline: auto;
|
|
112
|
+
}
|
|
113
|
+
@container (max-inline-size: 48rem) {
|
|
114
|
+
[part='body'] {
|
|
115
|
+
grid-template-columns: minmax(0, 1fr);
|
|
116
|
+
}
|
|
117
|
+
[part='details'] {
|
|
118
|
+
max-block-size: 45%;
|
|
119
|
+
border-block-start: var(--lr-border-width-thin) solid var(--lr-color-border);
|
|
120
|
+
border-inline-start: 0;
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
@container (max-inline-size: 30rem) {
|
|
124
|
+
[part='header'],
|
|
125
|
+
[part='composer'] {
|
|
126
|
+
padding-inline: var(--lr-space-s);
|
|
127
|
+
}
|
|
128
|
+
[part='messages'],
|
|
129
|
+
[part='details'] {
|
|
130
|
+
padding: var(--lr-space-s);
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
`;
|
|
134
|
+
//# sourceMappingURL=agent-workspace.styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agent-workspace.styles.js","sourceRoot":"","sources":["../../../src/components/agent-workspace/agent-workspace.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmIxB,CAAC"}
|