@field-studio/sdk 0.0.0-stage → 0.1.1
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/LICENSE +21 -0
- package/README.md +131 -2
- package/dist/index.d.ts +97 -0
- package/dist/index.js +129 -0
- package/dist/node/identity.d.ts +68 -0
- package/dist/node/identity.js +1 -0
- package/dist/node/index.d.ts +41 -0
- package/dist/node/index.js +165 -0
- package/dist/react/agent/AgentEditor.d.ts +16 -0
- package/dist/react/agent/AgentEditor.js +51 -0
- package/dist/react/agent/MCPManager.d.ts +12 -0
- package/dist/react/agent/MCPManager.js +72 -0
- package/dist/react/agent/SkillImport.d.ts +8 -0
- package/dist/react/agent/SkillImport.js +31 -0
- package/dist/react/agent/SkillViewer.d.ts +7 -0
- package/dist/react/agent/SkillViewer.js +61 -0
- package/dist/react/agent/catalog.css +205 -0
- package/dist/react/agent/index.d.ts +7 -0
- package/dist/react/agent/index.js +5 -0
- package/dist/react/agent/skillTitle.d.ts +3 -0
- package/dist/react/agent/skillTitle.js +4 -0
- package/dist/react/agent/types.d.ts +46 -0
- package/dist/react/agent/types.js +1 -0
- package/dist/react/assistant/AssistantPanel.d.ts +15 -0
- package/dist/react/assistant/AssistantPanel.js +144 -0
- package/dist/react/assistant/AssistantProvider.d.ts +119 -0
- package/dist/react/assistant/AssistantProvider.js +427 -0
- package/dist/react/assistant/QuestionPanel.d.ts +8 -0
- package/dist/react/assistant/QuestionPanel.js +32 -0
- package/dist/react/assistant/TaskComposer.d.ts +25 -0
- package/dist/react/assistant/TaskComposer.js +354 -0
- package/dist/react/assistant/TaskFiles.d.ts +24 -0
- package/dist/react/assistant/TaskFiles.js +107 -0
- package/dist/react/assistant/assistant.css +428 -0
- package/dist/react/assistant/composer.css +116 -0
- package/dist/react/assistant/files.css +19 -0
- package/dist/react/assistant/index.d.ts +10 -0
- package/dist/react/assistant/index.js +6 -0
- package/dist/react/assistant/layout.d.ts +7 -0
- package/dist/react/assistant/layout.js +19 -0
- package/dist/react/assistant/messages.d.ts +355 -0
- package/dist/react/assistant/messages.js +239 -0
- package/dist/react/assistant/questions.css +6 -0
- package/dist/react/assistant/types.d.ts +85 -0
- package/dist/react/assistant/types.js +1 -0
- package/dist/react/auth/AuthShell.d.ts +35 -0
- package/dist/react/auth/AuthShell.js +197 -0
- package/dist/react/auth/RoleManager.d.ts +23 -0
- package/dist/react/auth/RoleManager.js +95 -0
- package/dist/react/auth/auth.css +70 -0
- package/dist/react/auth/index.d.ts +2 -0
- package/dist/react/auth/index.js +1 -0
- package/dist/react/index.d.ts +57 -0
- package/dist/react/index.js +177 -0
- package/dist/react/ui/Controls.d.ts +78 -0
- package/dist/react/ui/Controls.js +234 -0
- package/dist/react/ui/base.css +261 -0
- package/dist/react/ui/controls.css +35 -0
- package/dist/react/ui/index.d.ts +2 -0
- package/dist/react/ui/index.js +2 -0
- package/dist/workspace.d.ts +107 -0
- package/dist/workspace.js +139 -0
- package/package.json +86 -3
|
@@ -0,0 +1,428 @@
|
|
|
1
|
+
/* Assistant SDK panel styles. Host apps may override; identical base rules are
|
|
2
|
+
kept here so the panel is fully styled with only this package imported. */
|
|
3
|
+
.panel {
|
|
4
|
+
background: #fff;
|
|
5
|
+
border: 1px solid #e1e7f0;
|
|
6
|
+
border-radius: 9px;
|
|
7
|
+
min-width: 0;
|
|
8
|
+
overflow: hidden;
|
|
9
|
+
}
|
|
10
|
+
.panel-header {
|
|
11
|
+
display: flex;
|
|
12
|
+
align-items: center;
|
|
13
|
+
justify-content: space-between;
|
|
14
|
+
padding: 15px 16px;
|
|
15
|
+
border-bottom: 1px solid #edf0f5;
|
|
16
|
+
min-height: 57px;
|
|
17
|
+
}
|
|
18
|
+
.panel-title {
|
|
19
|
+
display: flex;
|
|
20
|
+
align-items: center;
|
|
21
|
+
gap: 8px;
|
|
22
|
+
font-size: 13px;
|
|
23
|
+
font-weight: 650;
|
|
24
|
+
}
|
|
25
|
+
.panel-title svg {
|
|
26
|
+
color: #586b83;
|
|
27
|
+
}
|
|
28
|
+
.action-row {
|
|
29
|
+
display: flex;
|
|
30
|
+
align-items: center;
|
|
31
|
+
flex-wrap: wrap;
|
|
32
|
+
gap: 8px;
|
|
33
|
+
}
|
|
34
|
+
.action-row > .button {
|
|
35
|
+
flex-shrink: 0;
|
|
36
|
+
}
|
|
37
|
+
.ai-icon {
|
|
38
|
+
display: grid;
|
|
39
|
+
place-items: center;
|
|
40
|
+
width: 26px;
|
|
41
|
+
height: 26px;
|
|
42
|
+
background: #edf2ff;
|
|
43
|
+
border-radius: 8px;
|
|
44
|
+
color: #507be0;
|
|
45
|
+
}
|
|
46
|
+
.chat-panel {
|
|
47
|
+
display: flex;
|
|
48
|
+
flex-direction: column;
|
|
49
|
+
background: #fff;
|
|
50
|
+
}
|
|
51
|
+
:root {
|
|
52
|
+
--assistant-rail-width: 36px;
|
|
53
|
+
--assistant-collapse-width: 32px;
|
|
54
|
+
}
|
|
55
|
+
.assistant-rail {
|
|
56
|
+
position: fixed;
|
|
57
|
+
inset: 0 0 0 auto;
|
|
58
|
+
z-index: 56;
|
|
59
|
+
width: var(--assistant-rail-width);
|
|
60
|
+
display: flex;
|
|
61
|
+
flex-direction: column;
|
|
62
|
+
align-items: center;
|
|
63
|
+
gap: 6px;
|
|
64
|
+
padding: 0;
|
|
65
|
+
box-shadow: inset 1px 0 #e6ebf2;
|
|
66
|
+
background: #f0f3f8;
|
|
67
|
+
color: #465b72;
|
|
68
|
+
font-weight: 650;
|
|
69
|
+
}
|
|
70
|
+
.assistant-rail:hover {
|
|
71
|
+
background: #eaf1ff;
|
|
72
|
+
color: #2456bf;
|
|
73
|
+
}
|
|
74
|
+
.assistant-rail:focus-visible {
|
|
75
|
+
outline-offset: -4px;
|
|
76
|
+
}
|
|
77
|
+
.assistant-rail-arrow {
|
|
78
|
+
display: grid;
|
|
79
|
+
flex-shrink: 0;
|
|
80
|
+
height: calc(var(--assistant-header-height, 66px) - 1px);
|
|
81
|
+
place-items: center;
|
|
82
|
+
}
|
|
83
|
+
.assistant-rail-label {
|
|
84
|
+
writing-mode: vertical-rl;
|
|
85
|
+
text-orientation: sideways;
|
|
86
|
+
transform: rotate(180deg);
|
|
87
|
+
}
|
|
88
|
+
.assistant-rail-status {
|
|
89
|
+
width: 5px;
|
|
90
|
+
height: 5px;
|
|
91
|
+
border-radius: 50%;
|
|
92
|
+
background: #3169e5;
|
|
93
|
+
}
|
|
94
|
+
/* Align the expanded panel with the host topbar. */
|
|
95
|
+
.sidepanel {
|
|
96
|
+
position: fixed;
|
|
97
|
+
top: 0;
|
|
98
|
+
right: 0;
|
|
99
|
+
bottom: 0;
|
|
100
|
+
z-index: 55;
|
|
101
|
+
display: flex;
|
|
102
|
+
}
|
|
103
|
+
.sidepanel[hidden] {
|
|
104
|
+
display: none;
|
|
105
|
+
}
|
|
106
|
+
.sidepanel .panel.chat-panel {
|
|
107
|
+
min-width: 0;
|
|
108
|
+
flex: 1;
|
|
109
|
+
border-radius: 0;
|
|
110
|
+
border-top: 0;
|
|
111
|
+
border-right: 0;
|
|
112
|
+
border-bottom: 0;
|
|
113
|
+
border-left: 1px solid #e6ebf2;
|
|
114
|
+
}
|
|
115
|
+
.sidepanel-resizer {
|
|
116
|
+
position: absolute;
|
|
117
|
+
left: 0;
|
|
118
|
+
top: 0;
|
|
119
|
+
bottom: 0;
|
|
120
|
+
width: 8px;
|
|
121
|
+
cursor: col-resize;
|
|
122
|
+
touch-action: none;
|
|
123
|
+
border-radius: 4px;
|
|
124
|
+
}
|
|
125
|
+
.sidepanel-resizer:hover,
|
|
126
|
+
.sidepanel-resizer[data-resizing] {
|
|
127
|
+
background: #3169e533;
|
|
128
|
+
}
|
|
129
|
+
body.sidepanel-resizing {
|
|
130
|
+
user-select: none;
|
|
131
|
+
cursor: col-resize;
|
|
132
|
+
}
|
|
133
|
+
@media (max-width: 760px) {
|
|
134
|
+
.sidepanel {
|
|
135
|
+
width: 100vw !important;
|
|
136
|
+
}
|
|
137
|
+
.sidepanel-resizer {
|
|
138
|
+
display: none;
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
.chat-scroll {
|
|
142
|
+
padding: 18px 16px;
|
|
143
|
+
flex: 1;
|
|
144
|
+
max-height: 550px;
|
|
145
|
+
min-height: 300px;
|
|
146
|
+
overflow: auto;
|
|
147
|
+
}
|
|
148
|
+
.assistant-intro {
|
|
149
|
+
padding: 14px 0 12px;
|
|
150
|
+
}
|
|
151
|
+
.assistant-intro h3 {
|
|
152
|
+
display: flex;
|
|
153
|
+
align-items: center;
|
|
154
|
+
gap: 10px;
|
|
155
|
+
font-size: 15px;
|
|
156
|
+
margin: 0 0 7px;
|
|
157
|
+
}
|
|
158
|
+
.assistant-name {
|
|
159
|
+
overflow: hidden;
|
|
160
|
+
text-overflow: ellipsis;
|
|
161
|
+
white-space: nowrap;
|
|
162
|
+
}
|
|
163
|
+
.assistant-intro p {
|
|
164
|
+
font-size: 12px;
|
|
165
|
+
color: #586b83;
|
|
166
|
+
line-height: 1.9;
|
|
167
|
+
}
|
|
168
|
+
.assistant-logo {
|
|
169
|
+
flex: none;
|
|
170
|
+
width: 39px;
|
|
171
|
+
height: 39px;
|
|
172
|
+
background: #eaf1ff;
|
|
173
|
+
color: #5079dc;
|
|
174
|
+
border-radius: 12px;
|
|
175
|
+
display: grid;
|
|
176
|
+
place-items: center;
|
|
177
|
+
}
|
|
178
|
+
.suggestion-label {
|
|
179
|
+
font-size: 11px;
|
|
180
|
+
color: #586b83;
|
|
181
|
+
margin: 20px 0 9px;
|
|
182
|
+
}
|
|
183
|
+
.suggestion {
|
|
184
|
+
display: flex;
|
|
185
|
+
width: 100%;
|
|
186
|
+
gap: 9px;
|
|
187
|
+
align-items: center;
|
|
188
|
+
text-align: left;
|
|
189
|
+
border: 1px solid #e7edf6;
|
|
190
|
+
border-radius: 7px;
|
|
191
|
+
background: white;
|
|
192
|
+
padding: 11px;
|
|
193
|
+
margin-bottom: 8px;
|
|
194
|
+
font-size: 11px;
|
|
195
|
+
color: #60718b;
|
|
196
|
+
}
|
|
197
|
+
.suggestion svg:first-child {
|
|
198
|
+
color: #586b83;
|
|
199
|
+
}
|
|
200
|
+
.suggestion svg:last-child {
|
|
201
|
+
margin-left: auto;
|
|
202
|
+
color: #586b83;
|
|
203
|
+
}
|
|
204
|
+
.chat-context-trigger {
|
|
205
|
+
display: flex;
|
|
206
|
+
align-items: center;
|
|
207
|
+
gap: 8px;
|
|
208
|
+
width: 100%;
|
|
209
|
+
min-height: 36px;
|
|
210
|
+
font-size: 12px;
|
|
211
|
+
color: #586b83;
|
|
212
|
+
background: #f6f7f9;
|
|
213
|
+
padding: 6px 9px;
|
|
214
|
+
border: 0;
|
|
215
|
+
border-radius: 5px;
|
|
216
|
+
margin-bottom: 10px;
|
|
217
|
+
text-align: left;
|
|
218
|
+
cursor: pointer;
|
|
219
|
+
}
|
|
220
|
+
.chat-context-trigger:hover { background: #edf1f7; }
|
|
221
|
+
.chat-context-trigger svg { flex-shrink: 0; }
|
|
222
|
+
.chat-context-trigger svg:last-child { margin-left: auto; }
|
|
223
|
+
.context-dialog .chat-context-options { padding: 0 22px 20px; }
|
|
224
|
+
.context-dialog-hint {
|
|
225
|
+
color: #586b83;
|
|
226
|
+
margin: 18px 22px 12px;
|
|
227
|
+
font-size: 13px;
|
|
228
|
+
}
|
|
229
|
+
.chat-context-options {
|
|
230
|
+
display: flex;
|
|
231
|
+
flex-direction: column;
|
|
232
|
+
gap: 4px;
|
|
233
|
+
}
|
|
234
|
+
.chat-context-options label {
|
|
235
|
+
display: flex;
|
|
236
|
+
align-items: center;
|
|
237
|
+
gap: 6px;
|
|
238
|
+
min-height: 44px;
|
|
239
|
+
min-width: 0;
|
|
240
|
+
cursor: pointer;
|
|
241
|
+
color: #35445b;
|
|
242
|
+
}
|
|
243
|
+
.chat-context-options label span {
|
|
244
|
+
overflow-wrap: anywhere;
|
|
245
|
+
}
|
|
246
|
+
.chat-context-options input {
|
|
247
|
+
width: 15px;
|
|
248
|
+
height: 15px;
|
|
249
|
+
flex-shrink: 0;
|
|
250
|
+
margin: 0;
|
|
251
|
+
accent-color: #26735d;
|
|
252
|
+
}
|
|
253
|
+
.chat-context-options input:focus-visible {
|
|
254
|
+
outline: 2px solid #26735d;
|
|
255
|
+
outline-offset: 3px;
|
|
256
|
+
}
|
|
257
|
+
@media (max-width: 760px) {
|
|
258
|
+
.chat-context-trigger { min-height: 44px; }
|
|
259
|
+
}
|
|
260
|
+
.chat-bottom {
|
|
261
|
+
padding: 12px 13px;
|
|
262
|
+
border-top: 1px solid #edf1f6;
|
|
263
|
+
}
|
|
264
|
+
.user-message {
|
|
265
|
+
padding: 11px 12px;
|
|
266
|
+
border-radius: 9px 2px 9px 9px;
|
|
267
|
+
background: #edf3ff;
|
|
268
|
+
color: #45618f;
|
|
269
|
+
font-size: 12px;
|
|
270
|
+
margin: 9px 0 17px 18px;
|
|
271
|
+
}
|
|
272
|
+
.response-heading {
|
|
273
|
+
display: flex;
|
|
274
|
+
align-items: center;
|
|
275
|
+
gap: 8px;
|
|
276
|
+
font-size: 11px;
|
|
277
|
+
margin-bottom: 9px;
|
|
278
|
+
font-weight: 600;
|
|
279
|
+
}
|
|
280
|
+
.response {
|
|
281
|
+
font-size: 12px;
|
|
282
|
+
line-height: 1.9;
|
|
283
|
+
}
|
|
284
|
+
.response p {
|
|
285
|
+
color: #566a87;
|
|
286
|
+
}
|
|
287
|
+
.response h4 {
|
|
288
|
+
margin: 13px 0 5px;
|
|
289
|
+
}
|
|
290
|
+
.response ul {
|
|
291
|
+
padding-left: 19px;
|
|
292
|
+
color: #586b83;
|
|
293
|
+
}
|
|
294
|
+
.finding {
|
|
295
|
+
border-left: 2px solid #efc382;
|
|
296
|
+
padding: 4px 0 4px 9px;
|
|
297
|
+
margin: 9px 0;
|
|
298
|
+
background: #fffcf7;
|
|
299
|
+
}
|
|
300
|
+
.finding p {
|
|
301
|
+
font-size: 11px;
|
|
302
|
+
}
|
|
303
|
+
.event-line {
|
|
304
|
+
display: flex;
|
|
305
|
+
align-items: flex-start;
|
|
306
|
+
gap: 6px;
|
|
307
|
+
color: #586b83;
|
|
308
|
+
font-size: 11px;
|
|
309
|
+
margin: 5px 0;
|
|
310
|
+
}
|
|
311
|
+
.event-line svg {
|
|
312
|
+
margin-top: 4px;
|
|
313
|
+
color: #586b83;
|
|
314
|
+
flex-shrink: 0;
|
|
315
|
+
}
|
|
316
|
+
.tool-events {
|
|
317
|
+
color: #586b83;
|
|
318
|
+
font-size: 11px;
|
|
319
|
+
margin: 5px 0;
|
|
320
|
+
}
|
|
321
|
+
.tool-events summary {
|
|
322
|
+
display: flex;
|
|
323
|
+
align-items: center;
|
|
324
|
+
gap: 6px;
|
|
325
|
+
min-height: 32px;
|
|
326
|
+
cursor: pointer;
|
|
327
|
+
list-style: none;
|
|
328
|
+
}
|
|
329
|
+
.tool-events summary::-webkit-details-marker { display: none; }
|
|
330
|
+
.tool-events summary svg { flex-shrink: 0; }
|
|
331
|
+
.tool-events[open] summary svg { transform: rotate(90deg); }
|
|
332
|
+
.tool-events-list { padding-left: 18px; }
|
|
333
|
+
.tool-events-list .event-line span { overflow-wrap: anywhere; }
|
|
334
|
+
@media (max-width: 760px) {
|
|
335
|
+
.tool-events summary { min-height: 44px; }
|
|
336
|
+
}
|
|
337
|
+
.chat-panel > .panel-header {
|
|
338
|
+
position: relative;
|
|
339
|
+
/* Match the host topbar height so both bottom borders form one line. */
|
|
340
|
+
height: var(--assistant-header-height, 66px);
|
|
341
|
+
min-height: var(--assistant-header-height, 66px);
|
|
342
|
+
padding: 0 calc((var(--assistant-rail-width) - var(--assistant-collapse-width)) / 2) 0 16px;
|
|
343
|
+
border-bottom-color: #e6ebf2;
|
|
344
|
+
}
|
|
345
|
+
.assistant-collapse {
|
|
346
|
+
width: var(--assistant-collapse-width);
|
|
347
|
+
}
|
|
348
|
+
.assistant-collapse:focus-visible {
|
|
349
|
+
outline-offset: -2px;
|
|
350
|
+
}
|
|
351
|
+
.history-menu-root {
|
|
352
|
+
display: inline-flex;
|
|
353
|
+
}
|
|
354
|
+
.history-menu {
|
|
355
|
+
position: absolute;
|
|
356
|
+
top: calc(100% + 4px);
|
|
357
|
+
right: 12px;
|
|
358
|
+
z-index: 70;
|
|
359
|
+
width: 300px;
|
|
360
|
+
max-width: calc(100% - 24px);
|
|
361
|
+
max-height: 320px;
|
|
362
|
+
overflow-y: auto;
|
|
363
|
+
padding: 6px;
|
|
364
|
+
border: 1px solid #e1e8f1;
|
|
365
|
+
border-radius: 10px;
|
|
366
|
+
background: #fff;
|
|
367
|
+
box-shadow: 0 10px 32px #1d375624;
|
|
368
|
+
display: flex;
|
|
369
|
+
flex-direction: column;
|
|
370
|
+
gap: 2px;
|
|
371
|
+
text-align: left;
|
|
372
|
+
}
|
|
373
|
+
.history-menu button {
|
|
374
|
+
display: flex;
|
|
375
|
+
flex-direction: column;
|
|
376
|
+
gap: 3px;
|
|
377
|
+
padding: 8px 10px;
|
|
378
|
+
border-radius: 7px;
|
|
379
|
+
font-size: 12px;
|
|
380
|
+
color: #33455c;
|
|
381
|
+
text-align: left;
|
|
382
|
+
}
|
|
383
|
+
.history-menu button:hover {
|
|
384
|
+
background: #f0f5fd;
|
|
385
|
+
color: #2456bf;
|
|
386
|
+
}
|
|
387
|
+
.history-menu button.active {
|
|
388
|
+
background: #edf3ff;
|
|
389
|
+
}
|
|
390
|
+
.history-item-prompt {
|
|
391
|
+
max-width: 100%;
|
|
392
|
+
overflow: hidden;
|
|
393
|
+
text-overflow: ellipsis;
|
|
394
|
+
white-space: nowrap;
|
|
395
|
+
font-weight: 550;
|
|
396
|
+
}
|
|
397
|
+
.history-item-meta {
|
|
398
|
+
font-size: 11px;
|
|
399
|
+
color: #586b83;
|
|
400
|
+
}
|
|
401
|
+
.review-status {
|
|
402
|
+
flex-shrink: 0;
|
|
403
|
+
display: flex;
|
|
404
|
+
flex-wrap: wrap;
|
|
405
|
+
align-items: center;
|
|
406
|
+
gap: 8px;
|
|
407
|
+
padding: 10px 14px;
|
|
408
|
+
border-top: 1px solid #edf1f6;
|
|
409
|
+
background: #fff;
|
|
410
|
+
color: #586b83;
|
|
411
|
+
font-size: 11px;
|
|
412
|
+
}
|
|
413
|
+
.toast {
|
|
414
|
+
position: fixed;
|
|
415
|
+
bottom: 25px;
|
|
416
|
+
left: 50%;
|
|
417
|
+
transform: translateX(-50%);
|
|
418
|
+
background: #244664;
|
|
419
|
+
color: white;
|
|
420
|
+
padding: 12px 21px;
|
|
421
|
+
border-radius: 8px;
|
|
422
|
+
box-shadow: 0 5px 25px #25496930;
|
|
423
|
+
z-index: 80;
|
|
424
|
+
display: flex;
|
|
425
|
+
gap: 8px;
|
|
426
|
+
align-items: center;
|
|
427
|
+
font-size: 12px;
|
|
428
|
+
}
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
.task-composer.composer { border-radius: 16px; overflow: visible; position: relative; }
|
|
2
|
+
.composer-input { position: relative; }
|
|
3
|
+
.task-composer .composer-input textarea, .composer-highlights {
|
|
4
|
+
box-sizing: border-box;
|
|
5
|
+
padding: 15px 15px 8px;
|
|
6
|
+
font: inherit;
|
|
7
|
+
font-size: 13px;
|
|
8
|
+
line-height: 1.6;
|
|
9
|
+
white-space: pre-wrap;
|
|
10
|
+
overflow-wrap: break-word;
|
|
11
|
+
scrollbar-gutter: stable;
|
|
12
|
+
}
|
|
13
|
+
.task-composer .composer-input textarea {
|
|
14
|
+
display: block;
|
|
15
|
+
position: relative;
|
|
16
|
+
min-height: 68px;
|
|
17
|
+
border-radius: 16px 16px 0 0;
|
|
18
|
+
}
|
|
19
|
+
.composer-highlights {
|
|
20
|
+
position: absolute;
|
|
21
|
+
inset: 0;
|
|
22
|
+
overflow: hidden;
|
|
23
|
+
pointer-events: none;
|
|
24
|
+
color: transparent;
|
|
25
|
+
}
|
|
26
|
+
.composer-highlights mark {
|
|
27
|
+
color: inherit;
|
|
28
|
+
background: #e1ecff;
|
|
29
|
+
border-radius: 3px;
|
|
30
|
+
box-shadow: 0 0 0 1px #e1ecff;
|
|
31
|
+
}
|
|
32
|
+
@media (forced-colors: active) {
|
|
33
|
+
.composer-highlights mark {
|
|
34
|
+
forced-color-adjust: none;
|
|
35
|
+
color: transparent;
|
|
36
|
+
background: transparent;
|
|
37
|
+
outline: 1px solid Highlight;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
.task-composer textarea::placeholder { color: #7b879b; }
|
|
41
|
+
.task-composer .composer-footer { padding: 4px 11px 11px; gap: 8px; }
|
|
42
|
+
.composer-tools { display: flex; align-items: center; gap: 6px; min-width: 0; }
|
|
43
|
+
.composer-tools button { color: #586b83; background: transparent; border: 0; min-height: 34px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; border-radius: 8px; }
|
|
44
|
+
.composer-icon { width: 34px; flex-shrink: 0; }
|
|
45
|
+
.composer-tools button:hover:not(:disabled) { background: #f0f4fb; color: #3169e5; }
|
|
46
|
+
.task-composer .send { width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0; }
|
|
47
|
+
.composer-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 11px 12px 0; }
|
|
48
|
+
.composer-chip { display: inline-flex; align-items: center; gap: 5px; max-width: 100%; overflow-wrap: anywhere; background: #f0f4fb; border: 1px solid #dfe6ef; border-radius: 7px; padding: 4px 6px; font-size: 11px; color: #415777; }
|
|
49
|
+
.composer-chip button, .composer-list-title button { display: inline-flex; padding: 2px; background: transparent; color: inherit; flex-shrink: 0; }
|
|
50
|
+
.composer-suggestions { position: absolute; bottom: calc(100% + 8px); left: 0; right: 0; z-index: 5; border: 1px solid #e4eaf2; border-radius: 12px; background: #fff; box-shadow: 0 8px 24px #273c571f; padding: 7px; }
|
|
51
|
+
.composer-list-title { display: flex; justify-content: space-between; padding: 3px 5px 6px; color: #586b83; font-size: 11px; }
|
|
52
|
+
.composer-suggestions [role=listbox] { max-height: 160px; overflow: auto; }
|
|
53
|
+
.composer-suggestions [role=option] { display: flex; flex-direction: column; gap: 3px; width: 100%; text-align: left; background: transparent; padding: 8px; border-radius: 6px; font-size: 12px; color: #273c57; }
|
|
54
|
+
.composer-suggestions [role=option][aria-selected=true] { background: #edf3ff; }
|
|
55
|
+
.composer-suggestions small { color: #586b83; }
|
|
56
|
+
.composer-suggestions p, .composer-note, .composer-error { margin: 0; padding: 6px 12px 10px; font-size: 11px; line-height: 1.5; }
|
|
57
|
+
.composer-note { color: #586b83; }
|
|
58
|
+
.composer-error { color: #b42318; }
|
|
59
|
+
.task-composer.is-dragging { outline: 2px dashed #3169e5; background: #f3f7ff; }
|
|
60
|
+
.composer-drop-hint { pointer-events: none; position: absolute; inset: 0; display: grid; place-items: center; border-radius: 16px; color: #2456bf; background: #f3f7fff0; font-size: 14px; z-index: 2; }
|
|
61
|
+
.workspace-file-actions { display: flex; gap: 8px; margin: 10px 0; }
|
|
62
|
+
.workspace-dialog.dialog { width: min(880px, calc(100vw - 32px)); max-width: calc(100vw - 32px); }
|
|
63
|
+
.workspace-dialog .dialog-body { display: flex; flex-direction: column; gap: 12px; min-height: min(480px, 65vh); max-height: calc(85vh - 72px); overflow: auto; }
|
|
64
|
+
.workspace-dialog .workspace-file-list { max-height: none; flex: 1; overflow: visible; }
|
|
65
|
+
.workspace-dialog .workspace-file-actions { flex-wrap: wrap; }
|
|
66
|
+
.workspace-folders { display: flex; flex-direction: column; gap: 4px; }
|
|
67
|
+
.workspace-folders button { display: flex; gap: 8px; align-items: center; text-align: left; padding: 8px; background: #f8faff; color: #415777; overflow-wrap: anywhere; }
|
|
68
|
+
.workspace-folders small { margin-left: auto; flex-shrink: 0; }
|
|
69
|
+
.workspace-file-actions button { display: inline-flex; gap: 5px; align-items: center; border: 1px solid #dfe6ef; background: #f8faff; color: #415777; border-radius: 7px; padding: 6px 9px; font-size: 11px; }
|
|
70
|
+
.workspace-file-list { list-style: none; padding: 0; margin: 0 0 8px; max-height: 180px; overflow: auto; }
|
|
71
|
+
.workspace-file-list li { display: flex; gap: 9px; align-items: center; border-bottom: 1px solid #edf1f6; }
|
|
72
|
+
.workspace-file-list button, .workspace-file-list a { background: transparent; color: #586b83; padding: 8px 0; }
|
|
73
|
+
.workspace-file-list .workspace-reference { display: flex; flex: 1; flex-direction: column; min-width: 0; text-align: left; gap: 3px; font-size: 12px; }
|
|
74
|
+
.workspace-reference span { max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
|
75
|
+
.workspace-reference small { font-size: 10px; }
|
|
76
|
+
.task-composer button:focus-visible, .task-composer a:focus-visible { outline: 2px solid #3169e5; outline-offset: 2px; }
|
|
77
|
+
.composer {
|
|
78
|
+
border: 1px solid #dfe6ef;
|
|
79
|
+
border-radius: 8px;
|
|
80
|
+
background: #fff;
|
|
81
|
+
overflow: hidden;
|
|
82
|
+
}
|
|
83
|
+
.composer:focus-within {
|
|
84
|
+
border-color: #95b5f2;
|
|
85
|
+
box-shadow: 0 0 0 3px #eaf1ff;
|
|
86
|
+
}
|
|
87
|
+
.composer textarea {
|
|
88
|
+
resize: none;
|
|
89
|
+
width: 100%;
|
|
90
|
+
min-height: 66px;
|
|
91
|
+
border: 0;
|
|
92
|
+
background: none;
|
|
93
|
+
box-shadow: none;
|
|
94
|
+
outline: none;
|
|
95
|
+
padding: 11px;
|
|
96
|
+
font-size: 12px;
|
|
97
|
+
}
|
|
98
|
+
.composer-footer {
|
|
99
|
+
display: flex;
|
|
100
|
+
align-items: center;
|
|
101
|
+
justify-content: space-between;
|
|
102
|
+
padding: 3px 9px 8px;
|
|
103
|
+
}
|
|
104
|
+
.composer-footer small {
|
|
105
|
+
font-size: 11px;
|
|
106
|
+
color: #586b83;
|
|
107
|
+
}
|
|
108
|
+
.send {
|
|
109
|
+
background: #3169e5;
|
|
110
|
+
color: white;
|
|
111
|
+
width: 29px;
|
|
112
|
+
height: 28px;
|
|
113
|
+
border-radius: 6px;
|
|
114
|
+
display: grid;
|
|
115
|
+
place-items: center;
|
|
116
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
.attachment-controls { padding: 10px 12px 0; font-size: 12px; }
|
|
2
|
+
.attachment-controls label { display: flex; align-items: center; gap: 8px; }
|
|
3
|
+
.attachment-controls input { min-width: 0; width: 100%; font: inherit; }
|
|
4
|
+
.attachment-controls small, .task-files small { color: var(--muted, #64748b); }
|
|
5
|
+
.attachment-controls ul, .task-files ul { list-style: none; padding: 0; margin: 8px 0; }
|
|
6
|
+
.attachment-controls li, .task-files li { display: flex; gap: 8px; align-items: baseline; margin-top: 6px; }
|
|
7
|
+
.attachment-controls li span, .task-files a { min-width: 0; overflow-wrap: anywhere; flex: 1; }
|
|
8
|
+
.attachment-controls button { flex-shrink: 0; background: transparent; border: 0; cursor: pointer; padding: 4px; font: inherit; }
|
|
9
|
+
.task-files { margin: 10px 0; font-size: 12px; }
|
|
10
|
+
.task-files strong { font-weight: 600; }
|
|
11
|
+
.task-files small { flex-shrink: 0; }
|
|
12
|
+
.file-preview-link { flex: 1; min-width: 0; overflow-wrap: anywhere; text-align: left; background: none; border: 0; padding: 0; font: inherit; color: #235a94; cursor: pointer; }
|
|
13
|
+
.file-preview-link:hover { text-decoration: underline; }
|
|
14
|
+
.file-preview-dialog { width: min(860px, 100%); }
|
|
15
|
+
.file-preview-body { height: min(68vh, 640px); }
|
|
16
|
+
.file-preview-body pre { flex: 1; min-height: 0; overflow: auto; margin: 0; padding: 12px 14px; background: #f7fafd; border: 1px solid #e4eaf2; border-radius: 8px; font-size: 12px; line-height: 1.65; white-space: pre-wrap; overflow-wrap: anywhere; }
|
|
17
|
+
.file-preview-body iframe { flex: 1; min-height: 0; width: 100%; border: 1px solid #e4eaf2; border-radius: 8px; background: #fff; }
|
|
18
|
+
.file-preview-body > .button { justify-content: center; }
|
|
19
|
+
.attachment-progress { margin: 8px 12px; font-size: 12px; overflow-wrap: anywhere; }
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import './assistant.css';
|
|
2
|
+
export { AssistantProvider, AssistantPageBinding, useAssistant } from './AssistantProvider.js';
|
|
3
|
+
export type { AssistantApi, AssistantCatalog, AssistantContextOption, AssistantPageBindingProps, AssistantPageContext, AssistantProps, AssistantSuggestion, } from './AssistantProvider.js';
|
|
4
|
+
export { default as AssistantPanel } from './AssistantPanel.js';
|
|
5
|
+
export type { AssistantPanelProps } from './AssistantPanel.js';
|
|
6
|
+
export type { AssistantMessages } from './messages.js';
|
|
7
|
+
export { default as TaskComposer } from './TaskComposer.js';
|
|
8
|
+
export { default as QuestionPanel } from './QuestionPanel.js';
|
|
9
|
+
export { FilePreview, previewKind, submitWithAttachments, TaskFileLinks, validateAttachments, } from './TaskFiles.js';
|
|
10
|
+
export type { Analysis, PendingInput, Proposal, Skill, Task, TaskFile, } from './types.js';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import './assistant.css';
|
|
2
|
+
export { AssistantProvider, AssistantPageBinding, useAssistant } from './AssistantProvider.js';
|
|
3
|
+
export { default as AssistantPanel } from './AssistantPanel.js';
|
|
4
|
+
export { default as TaskComposer } from './TaskComposer.js';
|
|
5
|
+
export { default as QuestionPanel } from './QuestionPanel.js';
|
|
6
|
+
export { FilePreview, previewKind, submitWithAttachments, TaskFileLinks, validateAttachments, } from './TaskFiles.js';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export declare const CHAT_MIN_WIDTH = 340;
|
|
2
|
+
export declare const chatMaxWidth: () => number;
|
|
3
|
+
export declare const clampChatWidth: (width: number, min?: number, max?: number) => number;
|
|
4
|
+
/** Remember the assistant width so it survives reloads. */
|
|
5
|
+
export declare function readChatLayout(storageKey: string): {
|
|
6
|
+
width: number;
|
|
7
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export const CHAT_MIN_WIDTH = 340;
|
|
2
|
+
export const chatMaxWidth = () => Math.max(CHAT_MIN_WIDTH, Math.floor(window.innerWidth * (2 / 3)));
|
|
3
|
+
export const clampChatWidth = (width, min = CHAT_MIN_WIDTH, max = chatMaxWidth()) => Math.min(Math.max(width, min), max);
|
|
4
|
+
/** Remember the assistant width so it survives reloads. */
|
|
5
|
+
export function readChatLayout(storageKey) {
|
|
6
|
+
try {
|
|
7
|
+
const raw = window.localStorage.getItem(storageKey);
|
|
8
|
+
const parsed = raw
|
|
9
|
+
? JSON.parse(raw)
|
|
10
|
+
: null;
|
|
11
|
+
const width = clampChatWidth(typeof parsed?.width === 'number' && Number.isFinite(parsed.width)
|
|
12
|
+
? parsed.width
|
|
13
|
+
: 400);
|
|
14
|
+
return { width };
|
|
15
|
+
}
|
|
16
|
+
catch {
|
|
17
|
+
return { width: clampChatWidth(400) };
|
|
18
|
+
}
|
|
19
|
+
}
|