@corenel/web-ui 0.8.0 → 0.10.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/dist/AskUser.d.ts.map +1 -1
- package/dist/AskUser.js +3 -1
- package/dist/AskUser.js.map +1 -1
- package/dist/CommandTray.d.ts.map +1 -1
- package/dist/CommandTray.js +2 -1
- package/dist/CommandTray.js.map +1 -1
- package/dist/Composer.d.ts.map +1 -1
- package/dist/Composer.js +14 -6
- package/dist/Composer.js.map +1 -1
- package/dist/ContextBar.d.ts.map +1 -1
- package/dist/ContextBar.js +24 -1
- package/dist/ContextBar.js.map +1 -1
- package/dist/ContextManager.d.ts +10 -1
- package/dist/ContextManager.d.ts.map +1 -1
- package/dist/ContextManager.js +63 -26
- package/dist/ContextManager.js.map +1 -1
- package/dist/ContextStrip.d.ts +5 -1
- package/dist/ContextStrip.d.ts.map +1 -1
- package/dist/ContextStrip.js +4 -1
- package/dist/ContextStrip.js.map +1 -1
- package/dist/ExclusionsModal.d.ts +3 -0
- package/dist/ExclusionsModal.d.ts.map +1 -1
- package/dist/ExclusionsModal.js +28 -7
- package/dist/ExclusionsModal.js.map +1 -1
- package/dist/RichContent.d.ts.map +1 -1
- package/dist/RichContent.js +3 -1
- package/dist/RichContent.js.map +1 -1
- package/dist/SummaryTranscript.d.ts.map +1 -1
- package/dist/SummaryTranscript.js +4 -3
- package/dist/SummaryTranscript.js.map +1 -1
- package/dist/TodoBar.d.ts.map +1 -1
- package/dist/TodoBar.js +12 -6
- package/dist/TodoBar.js.map +1 -1
- package/dist/ToolFold.d.ts.map +1 -1
- package/dist/ToolFold.js +2 -1
- package/dist/ToolFold.js.map +1 -1
- package/dist/Transcript.d.ts.map +1 -1
- package/dist/Transcript.js +30 -20
- package/dist/Transcript.js.map +1 -1
- package/dist/agentChat/AgentChat.d.ts +8 -2
- package/dist/agentChat/AgentChat.d.ts.map +1 -1
- package/dist/agentChat/AgentChat.js +149 -90
- package/dist/agentChat/AgentChat.js.map +1 -1
- package/dist/agentChat/OptionsDrawer.js +1 -1
- package/dist/agentChat/OptionsDrawer.js.map +1 -1
- package/dist/agentChat/PlanReview.d.ts +37 -5
- package/dist/agentChat/PlanReview.d.ts.map +1 -1
- package/dist/agentChat/PlanReview.js +192 -24
- package/dist/agentChat/PlanReview.js.map +1 -1
- package/dist/agentChat/controller.d.ts +16 -1
- package/dist/agentChat/controller.d.ts.map +1 -1
- package/dist/agentChat/controller.js.map +1 -1
- package/dist/chatSkin.d.ts +20 -0
- package/dist/chatSkin.d.ts.map +1 -0
- package/dist/chatSkin.js +220 -0
- package/dist/chatSkin.js.map +1 -0
- package/dist/chatSkinContext.d.ts +55 -0
- package/dist/chatSkinContext.d.ts.map +1 -0
- package/dist/chatSkinContext.js +16 -0
- package/dist/chatSkinContext.js.map +1 -0
- package/dist/chatSkinCss.d.ts +3 -0
- package/dist/chatSkinCss.d.ts.map +1 -0
- package/dist/chatSkinCss.js +202 -0
- package/dist/chatSkinCss.js.map +1 -0
- package/dist/commandTurn.d.ts +4 -1
- package/dist/commandTurn.d.ts.map +1 -1
- package/dist/commandTurn.js +13 -1
- package/dist/commandTurn.js.map +1 -1
- package/dist/contextCopy.d.ts +13 -0
- package/dist/contextCopy.d.ts.map +1 -0
- package/dist/contextCopy.js +20 -0
- package/dist/contextCopy.js.map +1 -0
- package/dist/toolRender.d.ts.map +1 -1
- package/dist/toolRender.js +7 -6
- package/dist/toolRender.js.map +1 -1
- package/dist/transcriptSkin.d.ts +23 -1
- package/dist/transcriptSkin.d.ts.map +1 -1
- package/dist/transcriptSkin.js +134 -9
- package/dist/transcriptSkin.js.map +1 -1
- package/dist/transcriptSkinCss.d.ts.map +1 -1
- package/dist/transcriptSkinCss.js +17 -10
- package/dist/transcriptSkinCss.js.map +1 -1
- package/package.json +5 -5
package/dist/chatSkin.js
ADDED
|
@@ -0,0 +1,220 @@
|
|
|
1
|
+
import { jsxs as _jsxs, jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
/* The chat-level skin root. A skin whose reach is `chat` (SKIN_REACH) paints
|
|
3
|
+
* the whole chat surface from here: tokens, background, font, and one
|
|
4
|
+
* stylesheet holding its transcript decorations and its chat decorations. The
|
|
5
|
+
* transcript's own root sees this through ChatSkinContext and draws no second
|
|
6
|
+
* box. Any other skin gets a plain wrapper, so today's look is untouched. */
|
|
7
|
+
import { useMemo } from 'react';
|
|
8
|
+
import { SKIN_REACH, chatTokens } from './transcriptSkin';
|
|
9
|
+
import { SKIN_CSS } from './transcriptSkinCss';
|
|
10
|
+
import { CHAT_CSS } from './chatSkinCss';
|
|
11
|
+
import { ChatSkinContext, useChatSkin } from './chatSkinContext';
|
|
12
|
+
/* Idiom words per skin. The parts that show one keep their plain word as the
|
|
13
|
+
* accessible name and tooltip. Every word states something true about the
|
|
14
|
+
* chat: "HOLD · WILL QUEUE" is shown only while a run is going, which is when
|
|
15
|
+
* Send parks the message. */
|
|
16
|
+
export const CHAT_WORDS = {
|
|
17
|
+
mission: {
|
|
18
|
+
send: 'TRANSMIT',
|
|
19
|
+
queue: 'QUEUE',
|
|
20
|
+
stop: 'ABORT',
|
|
21
|
+
addContext: 'PAYLOAD',
|
|
22
|
+
modeLabel: (l) => `MODE ${l.toUpperCase()}`,
|
|
23
|
+
composerTitle: 'UPLINK',
|
|
24
|
+
composerIdle: 'READY',
|
|
25
|
+
composerBusy: 'HOLD · WILL QUEUE',
|
|
26
|
+
ctxFuel: { label: 'FUEL', left: 'LEFT', over: 'OVER BY' },
|
|
27
|
+
permTitle: (tool) => `GO / NO-GO POLL · ${tool.toUpperCase()}`,
|
|
28
|
+
budgetTitle: 'GO / NO-GO POLL · BUDGET',
|
|
29
|
+
allowOnce: 'GO',
|
|
30
|
+
allowSession: 'GO FOR SESSION',
|
|
31
|
+
deny: 'NO-GO',
|
|
32
|
+
budgetContinue: 'GO',
|
|
33
|
+
budgetStop: 'ABORT',
|
|
34
|
+
askTitle: (n) => (n > 1 ? `CAPCOM QUERY · ${n}` : 'CAPCOM QUERY'),
|
|
35
|
+
tasksPrefix: 'CHECKLIST',
|
|
36
|
+
followups: 'SUGGESTED',
|
|
37
|
+
},
|
|
38
|
+
/* A shell. No key hints like [y]/[n]: those keys do nothing here, and a
|
|
39
|
+
* hint that does nothing is a false statement. */
|
|
40
|
+
terminal: {
|
|
41
|
+
send: 'exec',
|
|
42
|
+
queue: 'queue',
|
|
43
|
+
stop: 'kill',
|
|
44
|
+
addContext: 'add',
|
|
45
|
+
modeLabel: (l) => `--mode=${l.toLowerCase()}`,
|
|
46
|
+
ctxLabel: 'ctx',
|
|
47
|
+
permTitle: (tool) => `? permission: ${tool}`,
|
|
48
|
+
budgetTitle: '? budget limit reached',
|
|
49
|
+
allowOnce: 'allow once',
|
|
50
|
+
allowSession: 'allow session',
|
|
51
|
+
deny: 'deny',
|
|
52
|
+
budgetContinue: 'continue',
|
|
53
|
+
budgetStop: 'kill',
|
|
54
|
+
askTitle: (n) => (n > 1 ? `? ${n} questions` : '? question'),
|
|
55
|
+
tasksPrefix: 'jobs',
|
|
56
|
+
followups: '# suggested',
|
|
57
|
+
},
|
|
58
|
+
/* Terminal's grammar on an amber screen, in capitals. */
|
|
59
|
+
crt: {
|
|
60
|
+
send: 'SEND',
|
|
61
|
+
queue: 'QUEUE',
|
|
62
|
+
stop: 'HALT',
|
|
63
|
+
addContext: 'ADD',
|
|
64
|
+
modeLabel: (l) => `MODE ${l.toUpperCase()}`,
|
|
65
|
+
ctxLabel: 'CTX',
|
|
66
|
+
permTitle: (tool) => `?? PERMISSION: ${tool.toUpperCase()}`,
|
|
67
|
+
budgetTitle: '?? BUDGET LIMIT REACHED',
|
|
68
|
+
allowOnce: 'ALLOW ONCE',
|
|
69
|
+
allowSession: 'ALLOW SESSION',
|
|
70
|
+
deny: 'DENY',
|
|
71
|
+
budgetContinue: 'CONTINUE',
|
|
72
|
+
budgetStop: 'HALT',
|
|
73
|
+
askTitle: (n) => (n > 1 ? `?? ${n} QUERIES` : '?? QUERY'),
|
|
74
|
+
tasksPrefix: 'JOBS',
|
|
75
|
+
followups: 'SUGGESTED',
|
|
76
|
+
},
|
|
77
|
+
/* A chat-client log. No /slash words: typing them would do nothing here. */
|
|
78
|
+
irc: {
|
|
79
|
+
send: 'send',
|
|
80
|
+
queue: 'queue',
|
|
81
|
+
stop: 'stop',
|
|
82
|
+
addContext: 'add',
|
|
83
|
+
modeLabel: (l) => `+${l.toLowerCase()}`,
|
|
84
|
+
ctxLabel: 'topic:',
|
|
85
|
+
permTitle: (tool) => `-!- agent requests ${tool}`,
|
|
86
|
+
budgetTitle: '-!- budget limit reached',
|
|
87
|
+
allowOnce: 'allow once',
|
|
88
|
+
allowSession: 'allow session',
|
|
89
|
+
deny: 'deny',
|
|
90
|
+
budgetContinue: 'continue',
|
|
91
|
+
budgetStop: 'stop',
|
|
92
|
+
askTitle: (n) => (n > 1 ? `-!- agent asks ${n} questions` : '-!- agent asks'),
|
|
93
|
+
tasksPrefix: 'todo',
|
|
94
|
+
followups: '-!- suggested',
|
|
95
|
+
},
|
|
96
|
+
/* A drawing sheet: the composer is the title block, questions are RFIs
|
|
97
|
+
* (requests for information). */
|
|
98
|
+
blueprint: {
|
|
99
|
+
send: 'ISSUE',
|
|
100
|
+
queue: 'QUEUE',
|
|
101
|
+
stop: 'HALT',
|
|
102
|
+
addContext: 'ATTACH',
|
|
103
|
+
modeLabel: (l) => `MODE ${l.toUpperCase()}`,
|
|
104
|
+
composerTitle: 'REQUEST',
|
|
105
|
+
composerIdle: 'READY',
|
|
106
|
+
composerBusy: 'HOLD \u00b7 WILL QUEUE',
|
|
107
|
+
ctxLabel: 'CTX',
|
|
108
|
+
permTitle: (tool) => `APPROVAL \u00b7 ${tool.toUpperCase()}`,
|
|
109
|
+
budgetTitle: 'APPROVAL \u00b7 BUDGET',
|
|
110
|
+
allowOnce: 'APPROVE',
|
|
111
|
+
allowSession: 'APPROVE FOR SESSION',
|
|
112
|
+
deny: 'REJECT',
|
|
113
|
+
budgetContinue: 'APPROVE',
|
|
114
|
+
budgetStop: 'HALT',
|
|
115
|
+
askTitle: (n) => (n > 1 ? `RFI \u00b7 ${n}` : 'RFI'),
|
|
116
|
+
tasksPrefix: 'TASKS',
|
|
117
|
+
followups: 'SUGGESTED',
|
|
118
|
+
},
|
|
119
|
+
/* Quiet: plain words, only the prompts reworded to be shorter. */
|
|
120
|
+
minimal: {
|
|
121
|
+
permTitle: (tool) => `Allow ${tool}?`,
|
|
122
|
+
budgetTitle: 'Budget reached',
|
|
123
|
+
askTitle: (n) => (n > 1 ? `${n} questions` : 'A question'),
|
|
124
|
+
},
|
|
125
|
+
/* A handheld game's dialogue boxes. No "A:"/"B:" button hints: there are no
|
|
126
|
+
* such keys here. */
|
|
127
|
+
handheld: {
|
|
128
|
+
send: 'SEND',
|
|
129
|
+
queue: 'QUEUE',
|
|
130
|
+
stop: 'STOP',
|
|
131
|
+
addContext: 'ADD',
|
|
132
|
+
modeLabel: (l) => `MODE ${l.toUpperCase()}`,
|
|
133
|
+
ctxLabel: 'CTX',
|
|
134
|
+
permTitle: (tool) => `AGENT wants to use ${tool.toUpperCase()}!`,
|
|
135
|
+
budgetTitle: 'BUDGET LIMIT REACHED!',
|
|
136
|
+
allowOnce: 'ALLOW',
|
|
137
|
+
allowSession: 'THIS SESSION',
|
|
138
|
+
deny: 'DENY',
|
|
139
|
+
budgetContinue: 'CONTINUE',
|
|
140
|
+
budgetStop: 'STOP',
|
|
141
|
+
askTitle: (n) => (n > 1 ? `AGENT has ${n} QUESTIONS!` : 'AGENT has a QUESTION!'),
|
|
142
|
+
tasksPrefix: 'QUEST',
|
|
143
|
+
followups: 'NEXT?',
|
|
144
|
+
},
|
|
145
|
+
/* A thermal slip at a counter: sending prints, a denial voids. */
|
|
146
|
+
receipt: {
|
|
147
|
+
send: 'PRINT',
|
|
148
|
+
queue: 'QUEUE',
|
|
149
|
+
stop: 'CANCEL',
|
|
150
|
+
addContext: 'ADD ITEM',
|
|
151
|
+
modeLabel: (l) => `MODE: ${l.toUpperCase()}`,
|
|
152
|
+
ctxLabel: 'CONTEXT',
|
|
153
|
+
permTitle: (tool) => `AUTHORIZATION REQUIRED \u00b7 ${tool.toUpperCase()}`,
|
|
154
|
+
budgetTitle: 'AUTHORIZATION REQUIRED \u00b7 BUDGET',
|
|
155
|
+
allowOnce: 'APPROVE',
|
|
156
|
+
allowSession: 'APPROVE FOR SESSION',
|
|
157
|
+
deny: 'VOID',
|
|
158
|
+
budgetContinue: 'APPROVE',
|
|
159
|
+
budgetStop: 'CANCEL',
|
|
160
|
+
askTitle: (n) => (n > 1 ? `${n} QUESTIONS` : 'QUESTION'),
|
|
161
|
+
tasksPrefix: 'ITEMS',
|
|
162
|
+
followups: 'SUGGESTED',
|
|
163
|
+
},
|
|
164
|
+
/* A grey desktop: the composer is a window, the prompt a Yes / No dialog.
|
|
165
|
+
* "Yes for this session", not "Yes to All": the grant is session-scoped. */
|
|
166
|
+
retro: {
|
|
167
|
+
composerTitle: 'New message',
|
|
168
|
+
composerIdle: 'Ready',
|
|
169
|
+
composerBusy: 'Busy \u00b7 will queue',
|
|
170
|
+
permTitle: (tool) => `Permission needed: ${tool}`,
|
|
171
|
+
allowOnce: 'Yes',
|
|
172
|
+
allowSession: 'Yes for this session',
|
|
173
|
+
deny: 'No',
|
|
174
|
+
askTitle: (n) => (n > 1 ? `${n} questions` : 'Question'),
|
|
175
|
+
},
|
|
176
|
+
/* A memo: plain English, a little formal. Send and Stop keep their words. */
|
|
177
|
+
paper: {
|
|
178
|
+
ctxLabel: 'Context',
|
|
179
|
+
permTitle: (tool) => `Approval requested: ${tool}`,
|
|
180
|
+
budgetTitle: 'Budget reached',
|
|
181
|
+
allowOnce: 'Approve once',
|
|
182
|
+
allowSession: 'Approve for this session',
|
|
183
|
+
deny: 'Decline',
|
|
184
|
+
askTitle: (n) => (n > 1 ? `${n} questions for you` : 'A question for you'),
|
|
185
|
+
followups: 'Perhaps next',
|
|
186
|
+
},
|
|
187
|
+
};
|
|
188
|
+
export function ChatSkinRoot({ skin, style, sheet = true, children }) {
|
|
189
|
+
const reach = SKIN_REACH[skin];
|
|
190
|
+
const value = useMemo(() => (reach.chat
|
|
191
|
+
? { skin, chat: true, header: reach.header, words: CHAT_WORDS[skin] ?? {} }
|
|
192
|
+
: { skin, chat: false, header: false, words: {} }), [skin, reach.chat, reach.header]);
|
|
193
|
+
/* Both branches render the same child shape ({sheet}{children}): a skin
|
|
194
|
+
* change then restyles the chat in place instead of remounting it, which
|
|
195
|
+
* would drop the scroll position, composer focus and any open popover. */
|
|
196
|
+
if (!reach.chat) {
|
|
197
|
+
return _jsx(ChatSkinContext.Provider, { value: value, children: _jsxs("div", { style: style, children: [null, children] }) });
|
|
198
|
+
}
|
|
199
|
+
const rootStyle = {
|
|
200
|
+
...style,
|
|
201
|
+
...chatTokens(skin),
|
|
202
|
+
background: 'var(--tx-bg)',
|
|
203
|
+
backgroundImage: 'var(--tx-bg-image, none)',
|
|
204
|
+
backgroundSize: 'var(--tx-bg-size, auto)',
|
|
205
|
+
color: 'var(--tx-fg)',
|
|
206
|
+
// A skin can give its controls a different face from its transcript.
|
|
207
|
+
fontFamily: 'var(--chat-font, var(--tx-font))',
|
|
208
|
+
};
|
|
209
|
+
return (_jsx(ChatSkinContext.Provider, { value: value, children: _jsxs("div", { "data-chat-skin": skin, style: rootStyle, children: [sheet ? _jsx("style", { children: SKIN_CSS[skin] + CHAT_CSS[skin] }) : null, children] }) }));
|
|
210
|
+
}
|
|
211
|
+
/** For a popover that renders outside the chat (a portal into document.body):
|
|
212
|
+
* hands the chat's skin on when it reaches the whole chat, so a control's
|
|
213
|
+
* popover looks like the control. Otherwise renders the children untouched. */
|
|
214
|
+
export function ChatSkinCarry({ children }) {
|
|
215
|
+
const chat = useChatSkin();
|
|
216
|
+
if (!chat.chat)
|
|
217
|
+
return _jsx(_Fragment, { children: children });
|
|
218
|
+
return _jsx(ChatSkinRoot, { skin: chat.skin, sheet: false, children: children });
|
|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AE,cAAc;QACrB,qEAAqE;QACrE,UAAU,EAAE,kCAAkC;KACxB,CAAC;IACzB,OAAO,CACL,KAAC,eAAe,CAAC,QAAQ,IAAC,KAAK,EAAE,KAAK,YACpC,iCAAqB,IAAI,EAAE,KAAK,EAAE,SAAS,aACxC,KAAK,CAAC,CAAC,CAAC,0BAAQ,QAAQ,CAAC,IAAI,CAAC,GAAG,QAAQ,CAAC,IAAI,CAAC,GAAS,CAAC,CAAC,CAAC,IAAI,EAC/D,QAAQ,IACL,GACmB,CAC5B,CAAC;AACJ,CAAC;AAED;;+EAE+E;AAC/E,MAAM,UAAU,aAAa,CAAC,EAAE,QAAQ,EAAiC;IACvE,MAAM,IAAI,GAAG,WAAW,EAAE,CAAC;IAC3B,IAAI,CAAC,IAAI,CAAC,IAAI;QAAE,OAAO,4BAAG,QAAQ,GAAI,CAAC;IACvC,OAAO,KAAC,YAAY,IAAC,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,KAAK,YAAG,QAAQ,GAAgB,CAAC;AAChF,CAAC"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import type { TranscriptSkin } from './transcriptSkin';
|
|
2
|
+
/** A skin's words for chat parts. Every field is optional: a missing one means
|
|
3
|
+
* the part keeps today's words. Parts that show one of these still use their
|
|
4
|
+
* plain words for `aria-label` and `title`, so the meaning never depends on
|
|
5
|
+
* reading the idiom. */
|
|
6
|
+
export interface ChatWords {
|
|
7
|
+
send?: string;
|
|
8
|
+
queue?: string;
|
|
9
|
+
stop?: string;
|
|
10
|
+
addContext?: string;
|
|
11
|
+
/** How the mode picker names the current mode, e.g. "MODE AUTO", "--mode=auto". */
|
|
12
|
+
modeLabel?: (label: string) => string;
|
|
13
|
+
/** A title bar over the composer box: its name, then the state on the right. */
|
|
14
|
+
composerTitle?: string;
|
|
15
|
+
composerIdle?: string;
|
|
16
|
+
/** Shown while a run is going, when Send parks the message instead. */
|
|
17
|
+
composerBusy?: string;
|
|
18
|
+
/** A label before the context bar's usual "used" reading, e.g. "ctx". */
|
|
19
|
+
ctxLabel?: string;
|
|
20
|
+
/** Context bar as a remaining-fuel gauge: its label, the word after the
|
|
21
|
+
* tokens left, and the words before the overshoot when the window is exceeded. */
|
|
22
|
+
ctxFuel?: {
|
|
23
|
+
label: string;
|
|
24
|
+
left: string;
|
|
25
|
+
over: string;
|
|
26
|
+
};
|
|
27
|
+
permTitle?: (tool: string) => string;
|
|
28
|
+
budgetTitle?: string;
|
|
29
|
+
allowOnce?: string;
|
|
30
|
+
allowSession?: string;
|
|
31
|
+
deny?: string;
|
|
32
|
+
budgetContinue?: string;
|
|
33
|
+
budgetStop?: string;
|
|
34
|
+
askTitle?: (count: number) => string;
|
|
35
|
+
tasksPrefix?: string;
|
|
36
|
+
followups?: string;
|
|
37
|
+
}
|
|
38
|
+
export interface ChatSkinValue {
|
|
39
|
+
skin: TranscriptSkin;
|
|
40
|
+
/** The skin paints the whole chat, not just the transcript. */
|
|
41
|
+
chat: boolean;
|
|
42
|
+
/** The chat's own header is inside the skin. */
|
|
43
|
+
header: boolean;
|
|
44
|
+
words: ChatWords;
|
|
45
|
+
}
|
|
46
|
+
export declare const ChatSkinContext: import("react").Context<ChatSkinValue>;
|
|
47
|
+
export declare function useChatSkin(): ChatSkinValue;
|
|
48
|
+
/** Props for a control showing a skin's word: its plain meaning becomes the
|
|
49
|
+
* accessible name and tooltip. With no skin word it adds nothing, so an
|
|
50
|
+
* unskinned control is exactly as before. */
|
|
51
|
+
export declare function plainName(word: string | undefined, label: string): {
|
|
52
|
+
'aria-label'?: string;
|
|
53
|
+
title?: string;
|
|
54
|
+
};
|
|
55
|
+
//# sourceMappingURL=chatSkinContext.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chatSkinContext.d.ts","sourceRoot":"","sources":["../chatSkinContext.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAEvD;;;w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BAAgB,WAAW,IAAI,aAAa,CAE3C;AAED;;6CAE6C;AAC7C,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,EAAE,KAAK,EAAE,MAAM,GAAG;IAAE,YAAY,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,CAE5G"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/* What a chat-level skin tells the parts inside it: which skin, whether it
|
|
2
|
+
* reaches the whole chat (and its header), and the part words it overrides.
|
|
3
|
+
* Kept apart from transcriptSkin.tsx and chatSkin.tsx so both can read it
|
|
4
|
+
* without importing each other. */
|
|
5
|
+
import { createContext, useContext } from 'react';
|
|
6
|
+
export const ChatSkinContext = createContext({ skin: 'default', chat: false, header: false, words: {} });
|
|
7
|
+
export function useChatSkin() {
|
|
8
|
+
return useContext(ChatSkinContext);
|
|
9
|
+
}
|
|
10
|
+
/** Props for a control showing a skin's word: its plain meaning becomes the
|
|
11
|
+
* accessible name and tooltip. With no skin word it adds nothing, so an
|
|
12
|
+
* unskinned control is exactly as before. */
|
|
13
|
+
export function plainName(word, label) {
|
|
14
|
+
return word ? { 'aria-label': label, title: label } : {};
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=chatSkinContext.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chatSkinContext.js","sourceRoot":"","sources":["../chatSkinContext.ts"],"names":[],"mappings":"AAAA;;;mCAGmC;AACnC,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AA6ClD,MAAM,CAAC,MAAM,eAAe,GAAG,aAAa,CAAgB,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,CAAC;AAExH,MAAM,UAAU,WAAW;IACzB,OAAO,UAAU,CAAC,eAAe,CAAC,CAAC;AACrC,CAAC;AAED;;6CAE6C;AAC7C,MAAM,UAAU,SAAS,CAAC,IAAwB,EAAE,KAAa;IAC/D,OAAO,IAAI,CAAC,CAAC,CAAC,EAAE,YAAY,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;AAC3D,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chatSkinCss.d.ts","sourceRoot":"","sources":["../chatSkinCss.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAyMvD,eAAO,MAAM,QAAQ,EAAE,MAAM,CAAC,cAAc,EAAE,MAAM,CAYnD,CAAC"}
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
const C = (skin) => `[data-chat-skin="${skin}"]`;
|
|
2
|
+
const P = (skin, part) => `${C(skin)} [data-chat-part="${part}"]`;
|
|
3
|
+
const M = 'mission';
|
|
4
|
+
/* The header's status reads from data-chat-running, which AgentChat sets only
|
|
5
|
+
* while a run is live: LIVE is never shown for an idle chat. The transcript's
|
|
6
|
+
* own log heading says LIVE unconditionally, so under the chat skin it drops
|
|
7
|
+
* the word and leaves live state to the header. Buttons do not inherit the
|
|
8
|
+
* font by default; inside the chat's own parts they take the skin's (not in
|
|
9
|
+
* the header, where a host's buttons live). */
|
|
10
|
+
const mission = `
|
|
11
|
+
${C(M)} [data-chat-part]:not([data-chat-part="header"]) button { font-family: inherit; }
|
|
12
|
+
${C(M)} [data-tx-skin] [data-tx-part="list"]::before { content: "MISSION LOG"; color: #7890a5; }
|
|
13
|
+
${P(M, 'header')} { background: #0f1821; text-transform: uppercase; letter-spacing: 0.06em; }
|
|
14
|
+
${P(M, 'header')}::before { content: "\\25CB STANDBY"; color: #7890a5; font-size: 10.5px; letter-spacing: 0.14em; white-space: nowrap; }
|
|
15
|
+
${P(M, 'header')}[data-chat-running]::before { content: "\\25CF LIVE"; color: #3ddc84; }
|
|
16
|
+
${P(M, 'ctx')} { --accent: #3ddc84; --surface-3: #16222d; --surface-1: #0f1821; }
|
|
17
|
+
${P(M, 'ctx-fill')} { -webkit-mask: repeating-linear-gradient(90deg, #000 0 6px, transparent 6px 8px); mask: repeating-linear-gradient(90deg, #000 0 6px, transparent 6px 8px); }
|
|
18
|
+
${P(M, 'ctx-label')} { color: #7890a5; font-size: 10.5px; letter-spacing: 0.14em; }
|
|
19
|
+
${P(M, 'perm')} { --grad-brand: #3ddc84; --text-on-accent: #0b1117; --warning-soft: #1a1409; }
|
|
20
|
+
${P(M, 'perm-head')} { text-transform: uppercase; letter-spacing: 0.12em; --text-primary: #ffb454; }
|
|
21
|
+
${P(M, 'perm-head')}::before { content: ""; display: inline-block; width: 8px; height: 8px; background: #ffb454; animation: chat-mc-blink 1s steps(1) infinite; }
|
|
22
|
+
${P(M, 'perm-session')} { --text-secondary: #3ddc84; --border-default: #3ddc84; letter-spacing: 0.1em; }
|
|
23
|
+
${P(M, 'perm-deny')} { --text-secondary: #ff5d5d; --border-default: #ff5d5d; letter-spacing: 0.1em; }
|
|
24
|
+
${P(M, 'perm-go')} { letter-spacing: 0.1em; }
|
|
25
|
+
${P(M, 'tray')} > :first-child::before { content: "CONSOLE"; margin-right: 8px; color: #7890a5; font-size: 10.5px; letter-spacing: 0.14em; }
|
|
26
|
+
${P(M, 'send')}, ${P(M, 'stop')}, ${P(M, 'queue')} { letter-spacing: 0.12em; }
|
|
27
|
+
${P(M, 'tasks')} { text-transform: uppercase; letter-spacing: 0.08em; }
|
|
28
|
+
@keyframes chat-mc-blink { 50% { opacity: 0; } }
|
|
29
|
+
@media (prefers-reduced-motion: reduce) {
|
|
30
|
+
${P(M, 'perm-head')}::before { animation: none; }
|
|
31
|
+
}
|
|
32
|
+
`;
|
|
33
|
+
const T = 'terminal';
|
|
34
|
+
/* A shell under a rule: no cards. The permission prompt is a line with a left
|
|
35
|
+
* rule; its choices are bare words. The header's status is a bracketed job
|
|
36
|
+
* state, read from data-chat-running like Mission control's. */
|
|
37
|
+
const terminal = `
|
|
38
|
+
${C(T)} [data-chat-part]:not([data-chat-part="header"]) button { font-family: inherit; }
|
|
39
|
+
${P(T, 'header')} { background: #0d1014; }
|
|
40
|
+
${P(T, 'header')}::before { content: "[idle]"; color: #7d8a9a; font-size: 11.5px; white-space: nowrap; }
|
|
41
|
+
${P(T, 'header')}[data-chat-running]::before { content: "[running]"; color: #7ee787; }
|
|
42
|
+
${P(T, 'ctx')} { --surface-1: #0d1014; --accent: #7ee787; }
|
|
43
|
+
${P(T, 'ctx-fill')} { -webkit-mask: repeating-linear-gradient(90deg, #000 0 7px, transparent 7px 9px); mask: repeating-linear-gradient(90deg, #000 0 7px, transparent 7px 9px); }
|
|
44
|
+
${P(T, 'ctx-label')} { color: #5fb3f9; font-size: 11.5px; }
|
|
45
|
+
${P(T, 'perm')} { --warning: transparent; --warning-soft: transparent; box-shadow: inset 2px 0 0 #f2c46d; }
|
|
46
|
+
${P(T, 'perm-head')} { --text-primary: #f2c46d; }
|
|
47
|
+
${P(T, 'perm-go')} { --grad-brand: transparent; --text-on-accent: #7ee787; }
|
|
48
|
+
${P(T, 'perm-session')} { --surface-1: transparent; --border-default: #26303b; --text-secondary: #a3afbe; }
|
|
49
|
+
${P(T, 'perm-deny')} { --surface-1: transparent; --border-default: #26303b; --text-secondary: #ff7b72; }
|
|
50
|
+
`;
|
|
51
|
+
const PA = 'paper';
|
|
52
|
+
/* A memo in a serif reading column: small capitals for headings, a double
|
|
53
|
+
* rule over the approval, italic asides. Paper shows no idle status; while a
|
|
54
|
+
* run is live the header says "Working", which is what the agent is doing. */
|
|
55
|
+
const paper = `
|
|
56
|
+
${C(PA)} [data-chat-part]:not([data-chat-part="header"]) button { font-family: inherit; }
|
|
57
|
+
${P(PA, 'header')} { background: #f7f3ea; font-variant: small-caps; letter-spacing: 0.03em; }
|
|
58
|
+
${P(PA, 'header')}[data-chat-running]::before { content: "Working"; font-style: italic; font-variant: normal; color: #72685b; white-space: nowrap; }
|
|
59
|
+
${P(PA, 'ctx')} { --surface-1: #f7f3ea; --accent: #8a5a2b; font-style: italic; }
|
|
60
|
+
${P(PA, 'ctx-label')} { color: #72685b; }
|
|
61
|
+
${P(PA, 'perm')} { --warning: #cfc3ae; --warning-soft: #fffdf7; box-shadow: inset 0 3px 0 #8a5a2b, 0 1px 2px rgba(60,40,20,0.12); }
|
|
62
|
+
${P(PA, 'perm-head')} { --text-primary: #2a2621; font-variant: small-caps; letter-spacing: 0.04em; }
|
|
63
|
+
${P(PA, 'perm-go')} { --grad-brand: #8a5a2b; --text-on-accent: #fffdf7; }
|
|
64
|
+
${P(PA, 'perm-deny')} { --text-secondary: #a8412f; }
|
|
65
|
+
${P(PA, 'tasks')}, ${P(PA, 'followups')} { font-style: italic; }
|
|
66
|
+
`;
|
|
67
|
+
const CR = 'crt';
|
|
68
|
+
/* Amber phosphor over the whole chat: one scanline layer and one glow on the
|
|
69
|
+
* root (the transcript's own layer is switched off so lines do not double).
|
|
70
|
+
* The chat's own parts read the mono face for code too (--font-mono is VT323
|
|
71
|
+
* in the transcript, unreadable at the chrome's 11px); the transcript is not a
|
|
72
|
+
* chat part, so it keeps its own.
|
|
73
|
+
* Terminal's grammar otherwise: a ruled permission line, bare choices. */
|
|
74
|
+
const crt = `
|
|
75
|
+
${C(CR)} { text-shadow: 0 0 4px rgba(255,170,60,0.45), 0 0 12px rgba(255,140,20,0.2); }
|
|
76
|
+
${C(CR)}::after { content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 60;
|
|
77
|
+
background: repeating-linear-gradient(to bottom, rgba(0,0,0,0.28) 0 1px, transparent 1px 3px);
|
|
78
|
+
box-shadow: inset 0 0 90px rgba(0,0,0,0.85); }
|
|
79
|
+
${C(CR)} [data-tx-skin="crt"]::after { content: none; }
|
|
80
|
+
${C(CR)} [data-chat-part] { --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Consolas, monospace; }
|
|
81
|
+
${C(CR)} [data-chat-part]:not([data-chat-part="header"]) button { font-family: inherit; }
|
|
82
|
+
${P(CR, 'header')} { background: #120c05; }
|
|
83
|
+
${P(CR, 'header')}::before { content: "[IDLE]"; color: #b8843a; font-size: 11.5px; white-space: nowrap; }
|
|
84
|
+
${P(CR, 'header')}[data-chat-running]::before { content: "[BUSY]"; color: #ffd08a; }
|
|
85
|
+
${P(CR, 'ctx')} { --surface-1: #120c05; --accent: #ffb347; }
|
|
86
|
+
${P(CR, 'ctx-fill')} { -webkit-mask: repeating-linear-gradient(90deg, #000 0 7px, transparent 7px 9px); mask: repeating-linear-gradient(90deg, #000 0 7px, transparent 7px 9px); }
|
|
87
|
+
${P(CR, 'ctx-label')} { color: #ffd08a; font-size: 11.5px; }
|
|
88
|
+
${P(CR, 'perm')} { --warning: transparent; --warning-soft: transparent; box-shadow: inset 2px 0 0 #ffd08a; }
|
|
89
|
+
${P(CR, 'perm-head')} { --text-primary: #ffd08a; }
|
|
90
|
+
${P(CR, 'perm-go')} { --grad-brand: transparent; --text-on-accent: #ffd08a; }
|
|
91
|
+
${P(CR, 'perm-session')} { --surface-1: transparent; --border-default: #3a2a12; --text-secondary: #d99a3f; }
|
|
92
|
+
${P(CR, 'perm-deny')} { --surface-1: transparent; --border-default: #3a2a12; --text-secondary: #ff6a3d; }
|
|
93
|
+
`;
|
|
94
|
+
const IR = 'irc';
|
|
95
|
+
/* A chat client: the header and the task line are blue status bars, the
|
|
96
|
+
* context reading is the channel topic, the permission request a notice. */
|
|
97
|
+
const irc = `
|
|
98
|
+
${C(IR)} [data-chat-part]:not([data-chat-part="header"]) button { font-family: inherit; }
|
|
99
|
+
${P(IR, 'header')} { background: #1c2b3a; }
|
|
100
|
+
${P(IR, 'header')}::before { content: "-!- idle"; color: #8b949e; font-size: 11.5px; white-space: nowrap; }
|
|
101
|
+
${P(IR, 'header')}[data-chat-running]::before { content: "-!- busy"; color: #3fb950; }
|
|
102
|
+
${P(IR, 'ctx')} { --surface-1: #151b21; --accent: #79c0ff; }
|
|
103
|
+
${P(IR, 'ctx-label')} { color: #e6edf3; }
|
|
104
|
+
${P(IR, 'perm')} { --warning: transparent; --warning-soft: transparent; }
|
|
105
|
+
${P(IR, 'perm-head')} { --text-primary: #e3b341; }
|
|
106
|
+
${P(IR, 'perm-go')} { --grad-brand: transparent; --text-on-accent: #3fb950; }
|
|
107
|
+
${P(IR, 'perm-session')} { --surface-1: transparent; --border-default: #262e36; --text-secondary: #79c0ff; }
|
|
108
|
+
${P(IR, 'perm-deny')} { --surface-1: transparent; --border-default: #262e36; --text-secondary: #ff7b72; }
|
|
109
|
+
${P(IR, 'tasks')} { --surface-2: #1c2b3a; --border-subtle: #1c2b3a; }
|
|
110
|
+
`;
|
|
111
|
+
const BP = 'blueprint';
|
|
112
|
+
/* A drafting sheet: uppercase labels with tracking, the approval a dashed
|
|
113
|
+
* callout, the composer a title block. "IN PROGRESS" shows only while a run is
|
|
114
|
+
* live; an idle sheet shows no status. */
|
|
115
|
+
const blueprint = `
|
|
116
|
+
${C(BP)} [data-chat-part]:not([data-chat-part="header"]) button { font-family: inherit; }
|
|
117
|
+
${P(BP, 'header')} { background: rgba(14,58,107,0.94); text-transform: uppercase; letter-spacing: 0.08em; }
|
|
118
|
+
${P(BP, 'header')}[data-chat-running]::before { content: "IN PROGRESS"; color: #ffe28a; font-size: 10.5px; letter-spacing: 0.12em; white-space: nowrap; }
|
|
119
|
+
${P(BP, 'ctx')} { --surface-1: rgba(14,58,107,0.94); --accent: #9fd0ff; }
|
|
120
|
+
${P(BP, 'ctx-label')} { color: #7fc4ff; font-size: 10.5px; letter-spacing: 0.12em; }
|
|
121
|
+
${P(BP, 'perm')} { --warning: transparent; outline: 1px dashed #ffe28a; outline-offset: -1px; }
|
|
122
|
+
${P(BP, 'perm-head')} { --text-primary: #ffe28a; text-transform: uppercase; letter-spacing: 0.1em; }
|
|
123
|
+
${P(BP, 'perm-go')} { --grad-brand: #9fd0ff; --text-on-accent: #0e3a6b; letter-spacing: 0.08em; }
|
|
124
|
+
${P(BP, 'perm-session')} { --border-default: #9fd0ff; letter-spacing: 0.08em; }
|
|
125
|
+
${P(BP, 'perm-deny')} { --text-secondary: #ff9f7a; --border-default: #ff9f7a; letter-spacing: 0.08em; }
|
|
126
|
+
${P(BP, 'send')}, ${P(BP, 'stop')}, ${P(BP, 'queue')}, ${P(BP, 'tasks')} { letter-spacing: 0.1em; }
|
|
127
|
+
`;
|
|
128
|
+
const MI = 'minimal';
|
|
129
|
+
/* Quiet: no cards. The permission prompt is a line with a warm left rule. */
|
|
130
|
+
const minimal = `
|
|
131
|
+
${C(MI)} [data-chat-part]:not([data-chat-part="header"]) button { font-family: inherit; }
|
|
132
|
+
${P(MI, 'ctx')} { --accent: #8a857e; --surface-3: #262422; }
|
|
133
|
+
${P(MI, 'perm')} { --warning: transparent; box-shadow: inset 2px 0 0 #d9b36c; }
|
|
134
|
+
${P(MI, 'perm-go')} { --grad-brand: #e9e6e1; --text-on-accent: #191817; }
|
|
135
|
+
`;
|
|
136
|
+
const HH = 'handheld';
|
|
137
|
+
/* Four greens. The permission prompt is a dialogue box with a double border;
|
|
138
|
+
* the header shows "RUNNING" only while a run is live. */
|
|
139
|
+
const handheld = `
|
|
140
|
+
${C(HH)} [data-chat-part] { --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Consolas, monospace; }
|
|
141
|
+
${C(HH)} [data-chat-part]:not([data-chat-part="header"]) button { font-family: inherit; }
|
|
142
|
+
${P(HH, 'header')} { background: #8bac0f; }
|
|
143
|
+
${P(HH, 'header')}[data-chat-running]::before { content: "RUNNING"; color: #0f380f; font-size: 11.5px; white-space: nowrap; }
|
|
144
|
+
${P(HH, 'ctx')} { --surface-1: #8bac0f; --surface-3: #9bbc0f; --accent: #0f380f; }
|
|
145
|
+
${P(HH, 'ctx-fill')} { -webkit-mask: repeating-linear-gradient(90deg, #000 0 7px, transparent 7px 9px); mask: repeating-linear-gradient(90deg, #000 0 7px, transparent 7px 9px); }
|
|
146
|
+
${P(HH, 'ctx-label')} { color: #0f380f; font-size: 11.5px; }
|
|
147
|
+
${P(HH, 'perm')} { --warning: #0f380f; box-shadow: inset 0 0 0 2px #9bbc0f, inset 0 0 0 4px #306230; }
|
|
148
|
+
${P(HH, 'perm-head')} { --text-primary: #0f380f; }
|
|
149
|
+
${P(HH, 'perm-go')} { --grad-brand: #0f380f; --text-on-accent: #9bbc0f; }
|
|
150
|
+
${P(HH, 'perm-session')} { --surface-1: #9bbc0f; --border-default: #306230; --text-secondary: #0f380f; }
|
|
151
|
+
${P(HH, 'perm-deny')} { --surface-1: #9bbc0f; --border-default: #306230; --text-secondary: #0f380f; }
|
|
152
|
+
`;
|
|
153
|
+
const RC = 'receipt';
|
|
154
|
+
/* A thermal slip: the approval is a dashed authorization block, the header
|
|
155
|
+
* says "PRINTING" only while a run is live (the reply is being printed). */
|
|
156
|
+
const receipt = `
|
|
157
|
+
${C(RC)} [data-chat-part]:not([data-chat-part="header"]) button { font-family: inherit; }
|
|
158
|
+
${P(RC, 'header')} { background: #fbfaf6; text-transform: uppercase; letter-spacing: 0.06em; }
|
|
159
|
+
${P(RC, 'header')}[data-chat-running]::before { content: "PRINTING"; color: #444444; font-size: 11px; white-space: nowrap; }
|
|
160
|
+
${P(RC, 'ctx')} { --surface-1: #fbfaf6; --surface-3: #e7e2d8; --accent: #222222; text-transform: uppercase; }
|
|
161
|
+
${P(RC, 'ctx-fill')} { -webkit-mask: repeating-linear-gradient(90deg, #000 0 2px, transparent 2px 3px); mask: repeating-linear-gradient(90deg, #000 0 2px, transparent 2px 3px); }
|
|
162
|
+
${P(RC, 'perm')} { --warning: transparent; outline: 1px dashed #999999; outline-offset: -1px; }
|
|
163
|
+
${P(RC, 'perm-head')} { --text-primary: #222222; letter-spacing: 0.06em; }
|
|
164
|
+
${P(RC, 'perm-go')} { --grad-brand: #222222; --text-on-accent: #fbfaf6; letter-spacing: 0.06em; }
|
|
165
|
+
${P(RC, 'perm-deny')} { --text-secondary: #a3261b; letter-spacing: 0.06em; }
|
|
166
|
+
${P(RC, 'send')}, ${P(RC, 'stop')}, ${P(RC, 'queue')} { letter-spacing: 0.06em; }
|
|
167
|
+
`;
|
|
168
|
+
const RT = 'retro';
|
|
169
|
+
const BEVEL_OUT = 'inset -1px -1px #0a0a0a, inset 1px 1px #ffffff, inset -2px -2px #808080, inset 2px 2px #dfdfdf';
|
|
170
|
+
const BEVEL_IN = 'inset 1px 1px #808080, inset -1px -1px #ffffff, inset 2px 2px #0a0a0a, inset -2px -2px #dfdfdf';
|
|
171
|
+
/* Grey bevels on a teal desktop: the header is a navy title bar, buttons are
|
|
172
|
+
* raised, the composer's text field is sunken white. */
|
|
173
|
+
const retro = `
|
|
174
|
+
${C(RT)} [data-chat-part]:not([data-chat-part="header"]) button { font-family: inherit; }
|
|
175
|
+
${P(RT, 'header')} { background: linear-gradient(90deg, #000080, #1084d0); --text-primary: #ffffff; --text-secondary: #ffffff; --text-tertiary: #dfe6f5; --border-subtle: #000080; }
|
|
176
|
+
${P(RT, 'header')}[data-chat-running]::before { content: "Busy"; color: #ffffff; font-size: 11px; white-space: nowrap; }
|
|
177
|
+
${P(RT, 'ctx')} { --surface-1: #c0c0c0; --surface-3: #ffffff; --accent: #000080; --text-tertiary: #000000; }
|
|
178
|
+
${P(RT, 'ctx-fill')} { -webkit-mask: repeating-linear-gradient(90deg, #000 0 8px, transparent 8px 10px); mask: repeating-linear-gradient(90deg, #000 0 8px, transparent 8px 10px); }
|
|
179
|
+
${P(RT, 'perm')} { --warning: #808080; box-shadow: ${BEVEL_OUT}; }
|
|
180
|
+
${P(RT, 'perm-head')} { --text-primary: #000000; }
|
|
181
|
+
${P(RT, 'perm-go')}, ${P(RT, 'perm-session')}, ${P(RT, 'perm-deny')} { --grad-brand: #c0c0c0; --surface-1: #c0c0c0; --text-on-accent: #000000; --text-secondary: #000000; --border-default: #c0c0c0; box-shadow: ${BEVEL_OUT}; }
|
|
182
|
+
${P(RT, 'perm-go')} { outline: 1px solid #000000; outline-offset: -1px; }
|
|
183
|
+
${P(RT, 'composer')} { --surface-1: #c0c0c0; --border-subtle: #808080; }
|
|
184
|
+
${P(RT, 'composer-box')} { --surface-2: #ffffff; box-shadow: ${BEVEL_IN}; }
|
|
185
|
+
${P(RT, 'composer-title')} { background: linear-gradient(90deg, #000080, #1084d0); --text-tertiary: #ffffff; --success: #ffffff; }
|
|
186
|
+
${P(RT, 'send')}, ${P(RT, 'stop')} { box-shadow: ${BEVEL_OUT}; }
|
|
187
|
+
${P(RT, 'tasks')} { --surface-2: #c0c0c0; --text-primary: #000000; --text-secondary: #000000; }
|
|
188
|
+
`;
|
|
189
|
+
export const CHAT_CSS = {
|
|
190
|
+
default: '',
|
|
191
|
+
terminal,
|
|
192
|
+
crt,
|
|
193
|
+
minimal,
|
|
194
|
+
paper,
|
|
195
|
+
blueprint,
|
|
196
|
+
irc,
|
|
197
|
+
handheld,
|
|
198
|
+
receipt,
|
|
199
|
+
mission,
|
|
200
|
+
retro,
|
|
201
|
+
};
|
|
202
|
+
//# sourceMappingURL=chatSkinCss.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chatSkinCss.js","sourceRoot":"","sources":["../chatSkinCss.ts"],"names":[],"mappings":"AASA,MAAM,CAAC,GAAG,CAAC,IAAoB,EAAU,EAAE,CAAC,oBAAoB,IAAI,IAAI,CAAC;AACzE,MAAM,CAAC,GAAG,CAAC,IAAoB,EAAE,IAAY,EAAU,EAAE,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,qBAAqB,IAAI,IAAI,CAAC;AAElG,MAAM,CAAC,GAAmB,SAAS,CAAC;AACpC;;;;;+CAK+C;AAC/C,MAAM,OAAO,GAAG;EACd,CAAC,CAAC,CAAC,CAAC;EACJ,CAAC,CAAC,CAAC,CAAC;EACJ,CAAC,CAAC,CAAC,EAAE,QAAQ,CAAC;EACd,CAAC,CAAC,CAAC,EAAE,QAAQ,CAAC;EACd,CAAC,CAAC,CAAC,EAAE,QAAQ,CAAC;EACd,CAAC,CAA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,OAAO;IACP,OAAO;IACP,KAAK;CACN,CAAC"}
|
package/dist/commandTurn.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type ConversationTurn } from '@corenel/harness/conversation';
|
|
2
2
|
/** The name recordCommand writes. Not a general tool: nothing else may claim it. */
|
|
3
3
|
export declare const COMMAND_TOOL = "console_command";
|
|
4
4
|
export interface CommandTurnInfo {
|
|
@@ -13,6 +13,9 @@ export interface CommandTurnInfo {
|
|
|
13
13
|
* card — and showing both put three stacked boxes on screen for one
|
|
14
14
|
* keystroke. */
|
|
15
15
|
shell: boolean;
|
|
16
|
+
/** Set by trayCommand: the turn is at or before the fold point, so Keep
|
|
17
|
+
* would be refused (the folded view is what is sent). */
|
|
18
|
+
folded?: boolean;
|
|
16
19
|
}
|
|
17
20
|
/**
|
|
18
21
|
* The command a turn records, or null when it is an ordinary turn.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"commandTurn.d.ts","sourceRoot":"","sources":["../commandTurn.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"commandTurn.d.ts","sourceRoot":"","sources":["../commandTurn.ts"],"names":[],"mappings":"AASA,OAAO,EAAgB,KAAK,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAEpF,oFAAoF;AACpF,eAAO,MAAM,YAAY,oBAAoB,CAAC;AAE9C,MAAM,WAAW,eAAe;IAC9B,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,EAAE,EAAE,OAAO,CAAC;IACZ,yEAAyE;IACzE,IAAI,EAAE,OAAO,CAAC;IACd;;;oBAGgB;IAChB,KAAK,EAAE,OAAO,CAAC;IACf;6DACyD;IACzD,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAQD;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,gBAAgB,GAAG,eAAe,GAAG,IAAI,CAmB9E;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,gBAAgB,EAAE,GAAG,eAAe,GAAG,IAAI,CAQ7E;AAED;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,gBAAgB,EAAE,GAAG,gBAAgB,EAAE,CAE7E"}
|
package/dist/commandTurn.js
CHANGED
|
@@ -1,3 +1,13 @@
|
|
|
1
|
+
/* Reading back a console command recorded into a session.
|
|
2
|
+
*
|
|
3
|
+
* `>pd ls` is stored as a synthetic tool call + result (AgentRuntime.recordCommand)
|
|
4
|
+
* so it persists, replays, and the model understands it. Two places need to
|
|
5
|
+
* recognise that shape again: the tray that offers to keep it, and the transcript
|
|
6
|
+
* filter that hides it until you do. If those two disagreed about what counts as
|
|
7
|
+
* a command turn, output would either show up twice or vanish entirely — so the
|
|
8
|
+
* recognition lives here, once, and both callers use it.
|
|
9
|
+
*/
|
|
10
|
+
import { isFoldedTurn } from '@corenel/harness/conversation';
|
|
1
11
|
/** The name recordCommand writes. Not a general tool: nothing else may claim it. */
|
|
2
12
|
export const COMMAND_TOOL = 'console_command';
|
|
3
13
|
/** The marker that makes a recorded command line a shell line. Kept in step with
|
|
@@ -49,7 +59,9 @@ export function trayCommand(turns) {
|
|
|
49
59
|
const info = readCommandTurn(turns[i]);
|
|
50
60
|
if (!info || info.shell)
|
|
51
61
|
continue;
|
|
52
|
-
|
|
62
|
+
if (info.kept)
|
|
63
|
+
return null;
|
|
64
|
+
return isFoldedTurn(turns, i) ? { ...info, folded: true } : info;
|
|
53
65
|
}
|
|
54
66
|
return null;
|
|
55
67
|
}
|
package/dist/commandTurn.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"commandTurn.js","sourceRoot":"","sources":["../commandTurn.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"commandTurn.js","sourceRoot":"","sources":["../commandTurn.ts"],"names":[],"mapp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E,CAAC;IACzE,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE,EAAE,IAAI,EAAE,IAAI,CAAC,QAAQ,EAAE,KAAK,EAAE,OAAO,CAAC,UAAU,CAAC,UAAU,CAAC,EAAE,CAAC;AAC9G,CAAC;AAED;;;;;;;;;;;;;GAaG;AACH,MAAM,UAAU,WAAW,CAAC,KAAyB;IACnD,KAAK,IAAI,CAAC,GAAG,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;QAC3C,MAAM,IAAI,GAAG,eAAe,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;QACvC,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,KAAK;YAAE,SAAS;QAClC,IAAI,IAAI,CAAC,IAAI;YAAE,OAAO,IAAI,CAAC;QAC3B,OAAO,YAAY,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,GAAG,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC;IACnE,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,eAAe,CAAC,KAAyB;IACvD,OAAO,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,IAAI,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC;AAChE,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/** An INCLUDED turn at or before the fold: the folded view stands for it. */
|
|
2
|
+
export declare const FOLDED_TITLE = "Folded into the summary. It is no longer sent on its own and cannot be included or dropped.";
|
|
3
|
+
/** An EXCLUDED turn at or before the fold: the folding run never saw it, and
|
|
4
|
+
* the runtime refuses to include it now. */
|
|
5
|
+
export declare const NOT_SENT_BEFORE_FOLD_TITLE = "Not sent before the fold. It cannot be included now.";
|
|
6
|
+
/** Tooltip suffix on a control that changes one turn mid-conversation. Text
|
|
7
|
+
* only: a title attribute cannot render the warning icon the visible lines use. */
|
|
8
|
+
export declare const CACHE_WARNING_TITLE = "Warning: changes what the model sees from this turn on. Everything cached after it is discarded, so the next request is billed at full price for that part.";
|
|
9
|
+
/** The visible line under the drawer's per-turn actions, drawn after an alert icon. */
|
|
10
|
+
export declare const CACHE_WARNING_TURN = "Dropping or restoring a turn discards the prompt cache from that turn on.";
|
|
11
|
+
/** The visible line beside the bulk modal's apply buttons, drawn after an alert icon. */
|
|
12
|
+
export declare const CACHE_WARNING_BULK = "Changing turns discards the prompt cache from the earliest changed turn on, so the next request costs more.";
|
|
13
|
+
//# sourceMappingURL=contextCopy.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contextCopy.d.ts","sourceRoot":"","sources":["../contextCopy.ts"],"names":[],"mappings":"AAQA,6EAA6E;AAC7E,eAAO,MAAM,YAAY,gGAAgG,CAAC;AAE1H;4CAC4C;AAC5C,eAAO,MAAM,0BAA0B,yDAAyD,CAAC;AAEjG;mFACmF;AACnF,eAAO,MAAM,mBAAmB,gKAAgK,CAAC;AAEjM,uFAAuF;AACvF,eAAO,MAAM,kBAAkB,8EAA8E,CAAC;AAE9G,yFAAyF;AACzF,eAAO,MAAM,kBAAkB,gHAAgH,CAAC"}
|