@1agh/maude 0.45.0 → 0.45.2
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 +585 -73
- 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/bin/_import-asset.mjs +35 -5
- package/apps/studio/client/panels/CapabilityBar.jsx +101 -0
- package/apps/studio/client/panels/ChatPanel.jsx +802 -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/ToolGroup.jsx +79 -0
- package/apps/studio/client/panels/acp-capabilities.js +71 -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 +648 -11
- package/apps/studio/dist/client.bundle.js +1596 -1594
- package/apps/studio/dist/styles.css +1 -1
- package/apps/studio/generation/whisper-models.test.ts +28 -1
- package/apps/studio/generation/whisper-models.ts +22 -7
- package/apps/studio/http.ts +33 -2
- 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-permission-prompt.test.ts +77 -0
- package/apps/studio/test/acp-permission.test.ts +262 -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/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/whats-new.json +34 -0
- package/cli/commands/design.mjs +107 -2
- package/cli/lib/pkg-root.mjs +42 -10
- package/cli/lib/pkg-root.test.mjs +33 -1
- package/package.json +11 -9
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
// Pure transcript view-mode filter (Task C4). Operates on a message's raw
|
|
2
|
+
// content parts BEFORE grouping (ToolGroup.jsx) — a pure, order-preserving
|
|
3
|
+
// filter, never a hardcoded assumption about what part types exist beyond the
|
|
4
|
+
// three the adapter emits (text / reasoning / tool-call).
|
|
5
|
+
|
|
6
|
+
export const TRANSCRIPT_VIEWS = ['normal', 'thinking', 'verbose', 'summary'];
|
|
7
|
+
export const DEFAULT_TRANSCRIPT_VIEW = 'normal';
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* `parts` (a message's content array) + `mode` → the parts to actually render.
|
|
11
|
+
* - normal — text + tool-calls; reasoning hidden (today's default look).
|
|
12
|
+
* - thinking — everything, including reasoning ("Thinking" disclosures).
|
|
13
|
+
* - verbose — everything (same set as thinking); the extra "verbose-ness"
|
|
14
|
+
* is a RENDER-detail toggle (see transcriptForcesExpand), not a
|
|
15
|
+
* different part set — tool calls stay visible either way.
|
|
16
|
+
* - summary — only the LAST text part (the final answer), nothing else.
|
|
17
|
+
* An unrecognized mode falls back to `normal` rather than showing everything
|
|
18
|
+
* (fail toward less noise, not more).
|
|
19
|
+
*/
|
|
20
|
+
export function filterTranscriptParts(parts, mode) {
|
|
21
|
+
const list = Array.isArray(parts) ? parts : [];
|
|
22
|
+
if (mode === 'summary') {
|
|
23
|
+
for (let i = list.length - 1; i >= 0; i--) {
|
|
24
|
+
if (list[i]?.type === 'text') return [list[i]];
|
|
25
|
+
}
|
|
26
|
+
return [];
|
|
27
|
+
}
|
|
28
|
+
if (mode === 'thinking' || mode === 'verbose') return list.slice();
|
|
29
|
+
return list.filter((p) => p?.type !== 'reasoning'); // normal (and any unknown mode)
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/** Verbose mode auto-expands tool-call detail (groups start open, cards show
|
|
33
|
+
* raw args/result) instead of requiring a click per card. */
|
|
34
|
+
export function transcriptForcesExpand(mode) {
|
|
35
|
+
return mode === 'verbose';
|
|
36
|
+
}
|