@fungi.computer/parakeet 0.4.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/client-contributions.d.ts +1 -0
- package/dist/commands/awaiting-driver.d.ts +20 -0
- package/dist/commands/awaiting-driver.js +121 -0
- package/dist/commands/builtins.js +6 -4
- package/dist/commands/interactions.d.ts +25 -0
- package/dist/commands/interactions.js +76 -2
- package/dist/commands/run.js +3 -3
- package/dist/commands/slash.d.ts +7 -3
- package/dist/commands/slash.js +2 -0
- package/dist/commands/use-slash-commands.d.ts +13 -0
- package/dist/commands/use-slash-commands.js +58 -1
- package/dist/components/ChatComposer.d.ts +2 -0
- package/dist/components/ChatComposer.js +158 -40
- package/dist/components/ClientRows.js +42 -26
- package/dist/components/CodeBlock.js +3 -2
- package/dist/components/CompletionMenu.d.ts +54 -0
- package/dist/components/CompletionMenu.js +52 -0
- 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.d.ts +30 -0
- package/dist/components/DecisionComposer.js +145 -0
- package/dist/components/InteractionPanel.d.ts +10 -1
- package/dist/components/InteractionPanel.js +9 -4
- package/dist/components/SlashMenu.d.ts +1 -3
- package/dist/components/SlashMenu.js +5 -13
- package/dist/components/TimelineItem.d.ts +1 -0
- package/dist/components/TimelineItem.js +4 -4
- package/dist/components/ToolGroup.d.ts +1 -0
- package/dist/components/ToolGroup.js +8 -8
- package/dist/conversation-opening.d.ts +1 -1
- package/dist/conversation-opening.js +2 -2
- package/dist/conversation.d.ts +5 -1
- package/dist/conversation.js +84 -29
- package/dist/core/approval-decision.d.ts +198 -0
- package/dist/core/approval-decision.js +291 -0
- package/dist/core/awaiting-answer.d.ts +229 -0
- package/dist/core/awaiting-answer.js +303 -0
- package/dist/core/build-timeline.js +61 -7
- package/dist/core/client-actions.d.ts +1 -0
- package/dist/core/client-actions.js +7 -1
- 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 +6 -0
- package/dist/core/draft-storage.js +25 -5
- package/dist/core/session-projection.d.ts +1 -0
- package/dist/core/session-projection.js +3 -2
- package/dist/core/session-query.d.ts +8 -0
- package/dist/core/session-query.js +13 -11
- 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 +10 -5
- package/dist/headless.js +9 -4
- package/dist/index.d.ts +3 -0
- package/dist/index.js +3 -0
- package/dist/parakeet.d.ts +6 -2
- package/dist/parakeet.js +24 -17
- package/dist/store/types.d.ts +14 -1
- package/dist/styles.css +911 -162
- package/dist/use-approval-awaiting.d.ts +22 -0
- package/dist/use-approval-awaiting.js +81 -0
- package/dist/use-decision.d.ts +20 -0
- package/dist/use-decision.js +79 -0
- package/docs/api/commands/slash.md +30 -26
- package/docs/api/headless.md +917 -54
- package/docs/api/index.md +166 -5
- package/package.json +17 -8
- package/src/completion-menu.css +72 -0
- package/src/composer-shell.css +125 -0
- package/src/styles.css +99 -53
- package/dist/components/WaitingNotice.d.ts +0 -7
- package/dist/components/WaitingNotice.js +0 -8
package/src/styles.css
CHANGED
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
* and chat composition: consumers load it instead of an additional Caps sheet.
|
|
5
5
|
*/
|
|
6
6
|
@import "@fungi.computer/caps/tailwind.css";
|
|
7
|
+
@import "./completion-menu.css";
|
|
8
|
+
@import "./composer-shell.css";
|
|
7
9
|
|
|
8
10
|
/* In the workspace Tailwind scans the component source; published, this
|
|
9
11
|
* entry ships without it, and the compiled components in dist carry the same
|
|
@@ -13,12 +15,6 @@
|
|
|
13
15
|
|
|
14
16
|
@plugin "@tailwindcss/typography";
|
|
15
17
|
|
|
16
|
-
@layer components {
|
|
17
|
-
.chat-composer {
|
|
18
|
-
border-top: 1px solid var(--color-base-300);
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
|
|
22
18
|
:root {
|
|
23
19
|
--prose-max-width: 80ch;
|
|
24
20
|
--tool-error-rail: #fff7a0;
|
|
@@ -43,66 +39,107 @@
|
|
|
43
39
|
overflow-wrap: break-word;
|
|
44
40
|
}
|
|
45
41
|
|
|
42
|
+
/* Conversation placement around the shared ComposerShell. */
|
|
46
43
|
.chat-composer {
|
|
47
|
-
background: var(--color-base-100);
|
|
48
44
|
flex-shrink: 0;
|
|
45
|
+
padding: 0 var(--spacing-xs) var(--spacing-xs);
|
|
49
46
|
}
|
|
50
47
|
|
|
51
|
-
.chat-composer .composer-
|
|
48
|
+
.chat-composer .composer-attachments {
|
|
52
49
|
display: flex;
|
|
53
|
-
|
|
54
|
-
gap:
|
|
55
|
-
|
|
50
|
+
flex-wrap: wrap;
|
|
51
|
+
gap: var(--spacing-sm);
|
|
52
|
+
margin: 0;
|
|
53
|
+
padding: var(--spacing-xs) var(--spacing-sm);
|
|
54
|
+
list-style: none;
|
|
56
55
|
}
|
|
57
56
|
|
|
58
|
-
.chat-composer .composer-
|
|
59
|
-
|
|
60
|
-
height: 32px;
|
|
61
|
-
align-items: center;
|
|
62
|
-
gap: 0.5rem;
|
|
63
|
-
padding: 0 0.75rem;
|
|
64
|
-
background: var(--color-base-200);
|
|
65
|
-
color: var(--color-base-content);
|
|
66
|
-
font-family: var(--font-sans);
|
|
67
|
-
font-size: 0.65rem;
|
|
57
|
+
.chat-composer .composer-attachments li {
|
|
58
|
+
position: relative;
|
|
68
59
|
}
|
|
69
60
|
|
|
70
|
-
.chat-composer .
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
61
|
+
.chat-composer .composer-attachments img {
|
|
62
|
+
display: block;
|
|
63
|
+
width: 3.5rem;
|
|
64
|
+
height: 3.5rem;
|
|
65
|
+
object-fit: cover;
|
|
74
66
|
}
|
|
75
67
|
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
68
|
+
/* Remove shows on hover or focus, the way a Prints reference tile does. */
|
|
69
|
+
.chat-composer .composer-attachment-remove {
|
|
70
|
+
position: absolute;
|
|
71
|
+
inset-block-start: 0;
|
|
72
|
+
inset-inline-end: 0;
|
|
73
|
+
opacity: 0;
|
|
74
|
+
}
|
|
75
|
+
.chat-composer .composer-attachments li:hover .composer-attachment-remove,
|
|
76
|
+
.chat-composer
|
|
77
|
+
.composer-attachments
|
|
78
|
+
li:focus-within
|
|
79
|
+
.composer-attachment-remove {
|
|
80
|
+
opacity: 1;
|
|
81
|
+
}
|
|
82
|
+
@media (hover: none) {
|
|
83
|
+
.chat-composer .composer-attachment-remove {
|
|
84
|
+
opacity: 1;
|
|
85
|
+
}
|
|
79
86
|
}
|
|
80
87
|
|
|
81
|
-
.chat-composer .
|
|
82
|
-
flex: 1;
|
|
83
|
-
min-width: 0;
|
|
84
|
-
overflow: hidden;
|
|
85
|
-
text-overflow: ellipsis;
|
|
86
|
-
white-space: nowrap;
|
|
88
|
+
.chat-composer .composer-status-chip {
|
|
87
89
|
color: var(--stipe-fg-muted);
|
|
90
|
+
font-size: var(--text-xs);
|
|
88
91
|
}
|
|
89
92
|
|
|
90
|
-
.chat-composer .
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
93
|
+
.chat-composer .composer-settings-chip {
|
|
94
|
+
display: inline-flex;
|
|
95
|
+
align-items: center;
|
|
96
|
+
gap: var(--spacing-xs);
|
|
94
97
|
}
|
|
95
98
|
|
|
96
|
-
.chat-composer .
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
99
|
+
.chat-composer .composer-settings-chip > svg {
|
|
100
|
+
width: var(--stipe-icon-size-sm);
|
|
101
|
+
height: var(--stipe-icon-size-sm);
|
|
102
|
+
}
|
|
103
|
+
|
|
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 {
|
|
107
|
+
display: none;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
/* A decision that took the composer over sits on the same surface: its
|
|
112
|
+
choices are rows on the composer, not a floating list box inside it. */
|
|
113
|
+
.chat-composer .parakeet-decision {
|
|
114
|
+
padding: var(--spacing-xs) var(--spacing-sm) 0;
|
|
115
|
+
}
|
|
116
|
+
/* The options are the composer's own rows, not a box inside it. Rows and
|
|
117
|
+
* the Details trigger keep a small hover inset and pull out by it, so their
|
|
118
|
+
* text shares the title's left edge. */
|
|
119
|
+
.chat-composer .parakeet-decision-list {
|
|
120
|
+
width: auto;
|
|
121
|
+
margin-inline: calc(-1 * var(--spacing-xs));
|
|
122
|
+
border: 0;
|
|
123
|
+
background: transparent;
|
|
124
|
+
box-shadow: none;
|
|
125
|
+
padding: 0;
|
|
126
|
+
}
|
|
127
|
+
.chat-composer .parakeet-decision .caps-disclosure-trigger {
|
|
128
|
+
width: auto;
|
|
129
|
+
margin-inline: calc(-1 * var(--spacing-xs));
|
|
130
|
+
padding-inline: var(--spacing-xs);
|
|
131
|
+
}
|
|
132
|
+
/* A decision's highlight is the reducer's, not the list's own active row. */
|
|
133
|
+
.parakeet-decision .parakeet-decision-list [role="option"] {
|
|
134
|
+
padding-inline: var(--spacing-xs);
|
|
135
|
+
background: transparent;
|
|
102
136
|
}
|
|
103
137
|
|
|
104
|
-
.
|
|
105
|
-
|
|
138
|
+
.parakeet-decision > [data-highlight],
|
|
139
|
+
.parakeet-decision
|
|
140
|
+
.parakeet-decision-list
|
|
141
|
+
[role="option"]:has([data-highlight]) {
|
|
142
|
+
background: var(--color-base-200);
|
|
106
143
|
}
|
|
107
144
|
|
|
108
145
|
.chat-composer .parakeet-command-notice[data-tone="error"] {
|
|
@@ -113,13 +150,6 @@
|
|
|
113
150
|
color: var(--color-success);
|
|
114
151
|
}
|
|
115
152
|
|
|
116
|
-
.chat-composer .footer-divider {
|
|
117
|
-
width: 3px;
|
|
118
|
-
height: 3px;
|
|
119
|
-
border-radius: 50%;
|
|
120
|
-
background: var(--stipe-fg-muted);
|
|
121
|
-
}
|
|
122
|
-
|
|
123
153
|
/* TanStack Highlight's retained Catppuccin theme. The token selectors are
|
|
124
154
|
emitted here with Parakeet's browser CSS instead of injected by a host. */
|
|
125
155
|
html:not([data-theme]),
|
|
@@ -261,3 +291,19 @@ pre.th-code {
|
|
|
261
291
|
.th-code {
|
|
262
292
|
font-family: var(--font-mono);
|
|
263
293
|
}
|
|
294
|
+
|
|
295
|
+
/* The decision's Later and Send sit on the composer's bottom edge, Send as the
|
|
296
|
+
same keycap the composer sends with. */
|
|
297
|
+
.parakeet-decision-actions {
|
|
298
|
+
display: flex;
|
|
299
|
+
align-items: center;
|
|
300
|
+
justify-content: flex-end;
|
|
301
|
+
gap: var(--spacing-xs);
|
|
302
|
+
--caps-keycap-width: auto;
|
|
303
|
+
--caps-keycap-justify: center;
|
|
304
|
+
--caps-keycap-padding: 0 var(--spacing-md);
|
|
305
|
+
--caps-keycap-height: calc(var(--size-field) * 8);
|
|
306
|
+
}
|
|
307
|
+
.parakeet-decision-actions > .caps-keycap-button {
|
|
308
|
+
height: var(--caps-keycap-height);
|
|
309
|
+
}
|
|
@@ -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
|
-
}
|