@fungi.computer/parakeet 0.5.0 → 0.6.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 +17 -1
- package/dist/components/ChatComposer.js +66 -60
- package/dist/components/CodeBlock.js +3 -2
- package/dist/components/ComposerModelKey.d.ts +11 -0
- package/dist/components/ComposerModelKey.js +9 -0
- package/dist/components/ComposerShell.d.ts +47 -0
- package/dist/components/ComposerShell.js +29 -0
- package/dist/components/DecisionComposer.js +1 -2
- package/dist/components/TimelineItem.js +1 -1
- package/dist/components/ToolGroup.js +2 -2
- package/dist/conversation-opening.d.ts +1 -1
- package/dist/conversation-opening.js +2 -2
- package/dist/conversation.js +12 -9
- package/dist/core/build-timeline.js +5 -2
- package/dist/core/composer-model-name.d.ts +3 -0
- package/dist/core/composer-model-name.js +21 -0
- package/dist/core/display-text.d.ts +2 -0
- package/dist/core/display-text.js +7 -0
- package/dist/core/draft-storage.d.ts +2 -0
- package/dist/core/draft-storage.js +14 -1
- package/dist/core/session-projection.d.ts +1 -0
- package/dist/core/session-projection.js +3 -2
- package/dist/core/session-view-state.d.ts +2 -4
- package/dist/core/session-view-state.js +27 -9
- package/dist/core/tool-groups.d.ts +3 -0
- package/dist/core/tool-groups.js +37 -1
- package/dist/core/tool-view.d.ts +6 -0
- package/dist/core/tool-view.js +33 -0
- package/dist/core/use-timeline-item-key.d.ts +3 -4
- package/dist/core/use-timeline-item-key.js +8 -14
- package/dist/headless.d.ts +4 -3
- package/dist/headless.js +4 -3
- package/dist/index.d.ts +3 -0
- package/dist/index.js +3 -0
- package/dist/parakeet.js +9 -11
- package/dist/store/types.d.ts +9 -0
- package/dist/styles.css +581 -114
- package/docs/api/headless.md +123 -41
- package/docs/api/index.md +153 -1
- package/package.json +10 -7
- package/src/completion-menu.css +2 -1
- package/src/composer-shell.css +125 -0
- package/src/styles.css +5 -87
- package/dist/components/WaitingNotice.d.ts +0 -7
- package/dist/components/WaitingNotice.js +0 -8
package/src/styles.css
CHANGED
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
*/
|
|
6
6
|
@import "@fungi.computer/caps/tailwind.css";
|
|
7
7
|
@import "./completion-menu.css";
|
|
8
|
+
@import "./composer-shell.css";
|
|
8
9
|
|
|
9
10
|
/* In the workspace Tailwind scans the component source; published, this
|
|
10
11
|
* entry ships without it, and the compiled components in dist carry the same
|
|
@@ -38,37 +39,12 @@
|
|
|
38
39
|
overflow-wrap: break-word;
|
|
39
40
|
}
|
|
40
41
|
|
|
41
|
-
/*
|
|
42
|
-
docked at the bottom. Text is typed straight onto it, and its bottom row is
|
|
43
|
-
the same Caps StatusTray row Prints uses: attach, model, Settings, Send. */
|
|
42
|
+
/* Conversation placement around the shared ComposerShell. */
|
|
44
43
|
.chat-composer {
|
|
45
44
|
flex-shrink: 0;
|
|
46
45
|
padding: 0 var(--spacing-xs) var(--spacing-xs);
|
|
47
46
|
}
|
|
48
47
|
|
|
49
|
-
.chat-composer .composer-body {
|
|
50
|
-
/* The completion menu rises from the card's top edge, in the card's own
|
|
51
|
-
face and edge, so menu and card read as one surface. */
|
|
52
|
-
--parakeet-completion-inset: 0px;
|
|
53
|
-
--parakeet-completion-face: var(--color-base-200);
|
|
54
|
-
--parakeet-completion-edge: var(--stipe-hairline);
|
|
55
|
-
display: block;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
/* An open completion menu sits on the card's top edge, so the card squares off to join it. */
|
|
59
|
-
.chat-composer .composer-body:has(> [data-parakeet-slash]) .composer-card {
|
|
60
|
-
border-start-start-radius: 0;
|
|
61
|
-
border-start-end-radius: 0;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
.chat-composer .composer-card {
|
|
65
|
-
padding: var(--spacing-sm);
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
.chat-composer .composer-card .caps-composer-input {
|
|
69
|
-
padding: var(--spacing-xs) var(--spacing-sm) 0;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
48
|
.chat-composer .composer-attachments {
|
|
73
49
|
display: flex;
|
|
74
50
|
flex-wrap: wrap;
|
|
@@ -94,7 +70,6 @@
|
|
|
94
70
|
position: absolute;
|
|
95
71
|
inset-block-start: 0;
|
|
96
72
|
inset-inline-end: 0;
|
|
97
|
-
background: var(--color-base-100);
|
|
98
73
|
opacity: 0;
|
|
99
74
|
}
|
|
100
75
|
.chat-composer .composer-attachments li:hover .composer-attachment-remove,
|
|
@@ -110,27 +85,11 @@
|
|
|
110
85
|
}
|
|
111
86
|
}
|
|
112
87
|
|
|
113
|
-
.chat-composer .composer-footer {
|
|
114
|
-
padding: var(--spacing-xs);
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
/* Model key and Settings chip read like Prints' model select and chip. */
|
|
118
|
-
.chat-composer .composer-model-key {
|
|
119
|
-
flex: 0 1 220px;
|
|
120
|
-
min-width: 0;
|
|
121
|
-
font-size: var(--text-xs);
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
.chat-composer .composer-model-readout,
|
|
125
88
|
.chat-composer .composer-status-chip {
|
|
126
89
|
color: var(--stipe-fg-muted);
|
|
127
90
|
font-size: var(--text-xs);
|
|
128
91
|
}
|
|
129
92
|
|
|
130
|
-
.chat-composer .composer-model-readout {
|
|
131
|
-
font-family: var(--font-mono);
|
|
132
|
-
}
|
|
133
|
-
|
|
134
93
|
.chat-composer .composer-settings-chip {
|
|
135
94
|
display: inline-flex;
|
|
136
95
|
align-items: center;
|
|
@@ -142,50 +101,13 @@
|
|
|
142
101
|
height: var(--stipe-icon-size-sm);
|
|
143
102
|
}
|
|
144
103
|
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
text-overflow: ellipsis;
|
|
149
|
-
white-space: nowrap;
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
/* Narrow composers keep one row (attach, model, Settings, Send) like Prints:
|
|
153
|
-
the model key gives up width first, and Send stays one key at the end. */
|
|
154
|
-
.chat-composer .composer-card {
|
|
155
|
-
container-type: inline-size;
|
|
156
|
-
}
|
|
157
|
-
@container (max-width: 34rem) {
|
|
158
|
-
.chat-composer .composer-model-key {
|
|
159
|
-
flex: 1 1 4rem;
|
|
160
|
-
}
|
|
161
|
-
.chat-composer [data-status-tray-chip="settings"] {
|
|
162
|
-
flex: 0 1 auto;
|
|
163
|
-
min-width: 0;
|
|
164
|
-
}
|
|
165
|
-
/* Narrow, the readout steps aside; the Settings tray still holds it. */
|
|
166
|
-
.chat-composer .composer-readout {
|
|
104
|
+
/* Quiet Session readouts yield on a phone; the shared shell owns key sizing. */
|
|
105
|
+
@container (max-width: 42rem) {
|
|
106
|
+
.chat-composer .composer-status-chip {
|
|
167
107
|
display: none;
|
|
168
108
|
}
|
|
169
109
|
}
|
|
170
110
|
|
|
171
|
-
/* Context, tokens and cost read as quiet text beside Send, not a chip. */
|
|
172
|
-
.chat-composer .composer-readout {
|
|
173
|
-
margin-inline-start: auto;
|
|
174
|
-
color: var(--stipe-fg-muted);
|
|
175
|
-
font-size: var(--text-xs);
|
|
176
|
-
line-height: 1;
|
|
177
|
-
font-variant-numeric: tabular-nums;
|
|
178
|
-
white-space: nowrap;
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
/* Send sits at the row's end, like Generate in Prints. */
|
|
182
|
-
.chat-composer .composer-send-key {
|
|
183
|
-
margin-inline-start: auto;
|
|
184
|
-
}
|
|
185
|
-
.chat-composer .composer-readout + .composer-send-key {
|
|
186
|
-
margin-inline-start: var(--spacing-sm);
|
|
187
|
-
}
|
|
188
|
-
|
|
189
111
|
/* A decision that took the composer over sits on the same surface: its
|
|
190
112
|
choices are rows on the composer, not a floating list box inside it. */
|
|
191
113
|
.chat-composer .parakeet-decision {
|
|
@@ -207,10 +129,6 @@
|
|
|
207
129
|
margin-inline: calc(-1 * var(--spacing-xs));
|
|
208
130
|
padding-inline: var(--spacing-xs);
|
|
209
131
|
}
|
|
210
|
-
.chat-composer .composer-model-key {
|
|
211
|
-
--caps-keycap-justify: space-between;
|
|
212
|
-
}
|
|
213
|
-
|
|
214
132
|
/* A decision's highlight is the reducer's, not the list's own active row. */
|
|
215
133
|
.parakeet-decision .parakeet-decision-list [role="option"] {
|
|
216
134
|
padding-inline: var(--spacing-xs);
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { type SessionViewState } from "../core/session-view-state.js";
|
|
2
|
-
/** A queued Session reports the executor fact; stopping a turn leaves its queue intact. */
|
|
3
|
-
export declare function WaitingNotice({ waiting, }: Readonly<{
|
|
4
|
-
waiting: Extract<SessionViewState, {
|
|
5
|
-
kind: "queued";
|
|
6
|
-
}> | null;
|
|
7
|
-
}>): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { queuedSessionLabel, } from "../core/session-view-state.js";
|
|
3
|
-
/** A queued Session reports the executor fact; stopping a turn leaves its queue intact. */
|
|
4
|
-
export function WaitingNotice({ waiting, }) {
|
|
5
|
-
if (waiting === null)
|
|
6
|
-
return null;
|
|
7
|
-
return (_jsx("div", { role: "status", className: "flex items-center justify-between gap-2 px-3 py-1.5 text-xs text-dim", "data-parakeet-waiting": "waiting", children: _jsx("span", { children: queuedSessionLabel(waiting) }) }));
|
|
8
|
-
}
|