@1agh/maude 0.45.1 → 0.46.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/apps/studio/acp/bridge.ts +628 -74
- package/apps/studio/acp/index.ts +172 -23
- package/apps/studio/acp/probe.ts +31 -7
- package/apps/studio/acp/transcript.ts +91 -5
- package/apps/studio/annotations-snap.ts +50 -10
- package/apps/studio/api.ts +344 -14
- package/apps/studio/artboard-guides-overlay.tsx +270 -0
- package/apps/studio/bin/_import-asset.mjs +35 -5
- package/apps/studio/bin/_pdf-playwright.mjs +35 -4
- package/apps/studio/bin/_png-playwright.mjs +38 -4
- package/apps/studio/bin/_pw-launch.mjs +52 -0
- package/apps/studio/bin/_pw-launch.test.mjs +90 -0
- package/apps/studio/bin/_smart-frames.mjs +419 -0
- package/apps/studio/bin/_smart-frames.test.mjs +140 -0
- package/apps/studio/bin/smart-frames.sh +30 -0
- package/apps/studio/canvas-edit.ts +302 -3
- package/apps/studio/canvas-lib.tsx +203 -11
- package/apps/studio/canvas-shell.tsx +167 -28
- package/apps/studio/client/app.jsx +678 -176
- package/apps/studio/client/panels/CapabilityBar.jsx +101 -0
- package/apps/studio/client/panels/ChatPanel.jsx +846 -133
- package/apps/studio/client/panels/ElicitationPrompt.jsx +429 -0
- package/apps/studio/client/panels/PermissionPrompt.jsx +119 -0
- package/apps/studio/client/panels/ReadinessList.jsx +17 -3
- package/apps/studio/client/panels/SettingsPanel.jsx +211 -0
- package/apps/studio/client/panels/ToolGroup.jsx +79 -0
- package/apps/studio/client/panels/acp-capabilities.js +82 -0
- package/apps/studio/client/panels/acp-elicitation.js +194 -0
- package/apps/studio/client/panels/acp-runtime.js +248 -9
- package/apps/studio/client/panels/acp-usage.js +65 -0
- package/apps/studio/client/panels/transcript-view.js +36 -0
- package/apps/studio/client/styles/6-acp-chat.css +689 -11
- package/apps/studio/dist/client.bundle.js +1738 -1736
- package/apps/studio/dist/comment-mount.js +2 -2
- package/apps/studio/dist/styles.css +1 -1
- package/apps/studio/dom-selection.ts +20 -0
- package/apps/studio/export-dialog.tsx +138 -18
- package/apps/studio/exporters/pdf.ts +332 -18
- package/apps/studio/exporters/png.ts +45 -3
- package/apps/studio/footage/schema.ts +17 -1
- package/apps/studio/generation/gemma-models.ts +224 -0
- package/apps/studio/generation/prefs.ts +43 -0
- package/apps/studio/generation/whisper-models.test.ts +28 -1
- package/apps/studio/generation/whisper-models.ts +22 -7
- package/apps/studio/http.ts +246 -9
- package/apps/studio/print/marks.ts +113 -0
- package/apps/studio/print/units.ts +269 -0
- package/apps/studio/print-overlay-content.tsx +132 -0
- package/apps/studio/test/acp-bridge.test.ts +11 -6
- package/apps/studio/test/acp-capabilities.test.ts +123 -0
- package/apps/studio/test/acp-caps-bridge.test.ts +274 -0
- package/apps/studio/test/acp-elicitation-bridge.test.ts +475 -0
- package/apps/studio/test/acp-elicitation.test.ts +251 -0
- package/apps/studio/test/acp-mode-banner.test.ts +45 -0
- package/apps/studio/test/acp-permission-prompt.test.ts +77 -0
- package/apps/studio/test/acp-permission.test.ts +262 -0
- package/apps/studio/test/acp-session-allowed-tools.test.ts +91 -0
- package/apps/studio/test/acp-toolgroup.test.ts +76 -0
- package/apps/studio/test/acp-transcript-view.test.ts +71 -0
- package/apps/studio/test/acp-transcript.test.ts +75 -2
- package/apps/studio/test/acp-usage-bridge.test.ts +136 -0
- package/apps/studio/test/acp-usage.test.ts +143 -0
- package/apps/studio/test/annotations-snap.test.ts +56 -0
- package/apps/studio/test/artboard-guides-overlay.test.tsx +152 -0
- package/apps/studio/test/artboard-kinds.test.tsx +83 -0
- package/apps/studio/test/artboard-selection-attrs.test.ts +69 -0
- package/apps/studio/test/canvas-meta-api.test.ts +167 -0
- package/apps/studio/test/element-structural-edit.test.ts +250 -0
- package/apps/studio/test/exporters/png.test.ts +49 -1
- package/apps/studio/test/fixtures/mock-acp-agent-caps.mjs +158 -0
- package/apps/studio/test/fixtures/mock-acp-agent-elicit-flood.mjs +46 -0
- package/apps/studio/test/fixtures/mock-acp-agent-elicit-url.mjs +42 -0
- package/apps/studio/test/fixtures/mock-acp-agent-elicit.mjs +63 -0
- package/apps/studio/test/fixtures/mock-acp-agent-permission-flood.mjs +51 -0
- package/apps/studio/test/fixtures/mock-acp-agent-permission.mjs +50 -0
- package/apps/studio/test/fixtures/mock-acp-agent-usage.mjs +56 -0
- package/apps/studio/test/import-asset.test.ts +31 -3
- package/apps/studio/test/pdf-print-boxes.test.ts +272 -0
- package/apps/studio/test/print-marks.test.ts +113 -0
- package/apps/studio/test/print-units.test.ts +173 -0
- package/apps/studio/test/use-snap-guides.test.ts +81 -0
- package/apps/studio/use-chrome-visibility.tsx +19 -0
- package/apps/studio/use-element-resize.tsx +21 -2
- package/apps/studio/use-snap-guides.tsx +73 -5
- package/apps/studio/use-spacing-handles.tsx +9 -5
- package/apps/studio/whats-new.json +62 -0
- package/cli/commands/design.mjs +116 -3
- package/cli/lib/pkg-root.mjs +42 -10
- package/cli/lib/pkg-root.test.mjs +33 -1
- package/package.json +11 -9
- package/plugins/design/dependencies.json +35 -0
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
// The model / effort / mode picker row (feature-acp-panel-dynamic-claude-code-
|
|
2
|
+
// capabilities) — replaces the two hardcoded MODELS/EFFORTS `<select>`s that
|
|
3
|
+
// used to live in ChatPanel.jsx's Composer. Model/effort/mode come from the
|
|
4
|
+
// LIVE ACP session (`modes`/`configOptions`) — never a static list. Any OTHER
|
|
5
|
+
// advertised option (e.g. an "Agent persona" selector) is deliberately NOT
|
|
6
|
+
// rendered here — user call: keep this row to the three controls people
|
|
7
|
+
// actually reach for, not every generic config option the session offers.
|
|
8
|
+
|
|
9
|
+
import { flattenSelectOptions } from './acp-capabilities.js';
|
|
10
|
+
|
|
11
|
+
function OptionSelect({ id, label, currentValue, options, onChange, disabled }) {
|
|
12
|
+
const flat = flattenSelectOptions(options);
|
|
13
|
+
if (!flat.length) return null;
|
|
14
|
+
return (
|
|
15
|
+
<select
|
|
16
|
+
className="chat-select"
|
|
17
|
+
value={currentValue ?? ''}
|
|
18
|
+
aria-label={label}
|
|
19
|
+
title={flat.find((o) => o.value === currentValue)?.description || label}
|
|
20
|
+
disabled={disabled}
|
|
21
|
+
onChange={(e) => onChange(id, e.target.value)}
|
|
22
|
+
>
|
|
23
|
+
{flat.map((o) => (
|
|
24
|
+
<option key={o.value} value={o.value}>
|
|
25
|
+
{o.name || o.value}
|
|
26
|
+
</option>
|
|
27
|
+
))}
|
|
28
|
+
</select>
|
|
29
|
+
);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export default function CapabilityBar({ modes, configOptions, onSetMode, onSetConfig, disabled }) {
|
|
33
|
+
const modeList = modes?.availableModes ?? [];
|
|
34
|
+
const model = configOptions?.model ?? null;
|
|
35
|
+
const effort = configOptions?.effort ?? null;
|
|
36
|
+
const fast = configOptions?.fast ?? null;
|
|
37
|
+
|
|
38
|
+
// Nothing arrived yet — the session is still establishing (a fresh chat
|
|
39
|
+
// spawns `claude` on first view; see ChatThread's warmedOnVisibleRef). Show
|
|
40
|
+
// a placeholder instead of rendering nothing at all, so this row doesn't
|
|
41
|
+
// read as "the picker disappeared" while it's just still connecting.
|
|
42
|
+
if (!modeList.length && !model && !effort && !fast) {
|
|
43
|
+
return (
|
|
44
|
+
<span className="chat-caps chat-caps--connecting" data-testid="chat-caps-connecting">
|
|
45
|
+
Connecting…
|
|
46
|
+
</span>
|
|
47
|
+
);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
return (
|
|
51
|
+
<div className="chat-caps" data-testid="chat-caps-bar">
|
|
52
|
+
{modeList.length ? (
|
|
53
|
+
<select
|
|
54
|
+
className="chat-select"
|
|
55
|
+
value={modes?.currentModeId ?? ''}
|
|
56
|
+
aria-label="Permission mode"
|
|
57
|
+
data-testid="chat-mode-picker"
|
|
58
|
+
title={modeList.find((m) => m.id === modes?.currentModeId)?.description || 'Permission mode'}
|
|
59
|
+
disabled={disabled}
|
|
60
|
+
onChange={(e) => onSetMode(e.target.value)}
|
|
61
|
+
>
|
|
62
|
+
{modeList.map((m) => (
|
|
63
|
+
<option key={m.id} value={m.id}>
|
|
64
|
+
{m.name || m.id}
|
|
65
|
+
</option>
|
|
66
|
+
))}
|
|
67
|
+
</select>
|
|
68
|
+
) : null}
|
|
69
|
+
{model ? (
|
|
70
|
+
<OptionSelect
|
|
71
|
+
id={model.id}
|
|
72
|
+
label="Model"
|
|
73
|
+
currentValue={model.currentValue}
|
|
74
|
+
options={model.options}
|
|
75
|
+
onChange={onSetConfig}
|
|
76
|
+
disabled={disabled}
|
|
77
|
+
/>
|
|
78
|
+
) : null}
|
|
79
|
+
{effort ? (
|
|
80
|
+
<OptionSelect
|
|
81
|
+
id={effort.id}
|
|
82
|
+
label="Effort"
|
|
83
|
+
currentValue={effort.currentValue}
|
|
84
|
+
options={effort.options}
|
|
85
|
+
onChange={onSetConfig}
|
|
86
|
+
disabled={disabled}
|
|
87
|
+
/>
|
|
88
|
+
) : null}
|
|
89
|
+
{fast ? (
|
|
90
|
+
<OptionSelect
|
|
91
|
+
id={fast.id}
|
|
92
|
+
label="Fast mode"
|
|
93
|
+
currentValue={fast.currentValue}
|
|
94
|
+
options={fast.options}
|
|
95
|
+
onChange={onSetConfig}
|
|
96
|
+
disabled={disabled}
|
|
97
|
+
/>
|
|
98
|
+
) : null}
|
|
99
|
+
</div>
|
|
100
|
+
);
|
|
101
|
+
}
|