@huanlin/dsh-plugin-merge-tool-calls 0.4.0 → 0.4.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/README.md +4 -3
- package/lib/client.js +2121 -2051
- package/lib/client.js.map +1 -1
- package/lib/index.js +119 -22
- package/lib/types/client/card-model.d.ts +77 -77
- package/lib/types/client/dictionaries.d.ts +22 -22
- package/lib/types/client/index.d.ts +29 -29
- package/lib/types/client/locales.d.ts +109 -103
- package/lib/types/client/merge-run.d.ts +49 -49
- package/lib/types/client/rows.d.ts +90 -77
- package/lib/types/client/tool-names.d.ts +11 -5
- package/lib/types/types.d.ts +2 -2
- package/package.json +8 -13
|
@@ -1,103 +1,109 @@
|
|
|
1
|
-
/** Product copy for the merged tool-call rows. */
|
|
2
|
-
export declare const zh: {
|
|
3
|
-
running: string;
|
|
4
|
-
failed: string;
|
|
5
|
-
stopped: string;
|
|
6
|
-
expand: string;
|
|
7
|
-
collapse: string;
|
|
8
|
-
more: string;
|
|
9
|
-
showLess: string;
|
|
10
|
-
mergedCount: string;
|
|
11
|
-
countFiles: string;
|
|
12
|
-
countQueries: string;
|
|
13
|
-
countCommands: string;
|
|
14
|
-
countPrograms: string;
|
|
15
|
-
countCalls: string;
|
|
16
|
-
copy: string;
|
|
17
|
-
copied: string;
|
|
18
|
-
'
|
|
19
|
-
'
|
|
20
|
-
'
|
|
21
|
-
'terminal.
|
|
22
|
-
'terminal.
|
|
23
|
-
'terminal.
|
|
24
|
-
'terminal.
|
|
25
|
-
'terminal.
|
|
26
|
-
'terminal.
|
|
27
|
-
'terminal.
|
|
28
|
-
'terminal.
|
|
29
|
-
'terminal.
|
|
30
|
-
'
|
|
31
|
-
'
|
|
32
|
-
'
|
|
33
|
-
'
|
|
34
|
-
'
|
|
35
|
-
'
|
|
36
|
-
'
|
|
37
|
-
'
|
|
38
|
-
'search.
|
|
39
|
-
'search.
|
|
40
|
-
'search.
|
|
41
|
-
'search.
|
|
42
|
-
'
|
|
43
|
-
'
|
|
44
|
-
'
|
|
45
|
-
'
|
|
46
|
-
'
|
|
47
|
-
'
|
|
48
|
-
'
|
|
49
|
-
'web.
|
|
50
|
-
'
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
'
|
|
73
|
-
'
|
|
74
|
-
'
|
|
75
|
-
'terminal.
|
|
76
|
-
'terminal.
|
|
77
|
-
'terminal.
|
|
78
|
-
'terminal.
|
|
79
|
-
'terminal.
|
|
80
|
-
'terminal.
|
|
81
|
-
'
|
|
82
|
-
'
|
|
83
|
-
'
|
|
84
|
-
'
|
|
85
|
-
'
|
|
86
|
-
'
|
|
87
|
-
'
|
|
88
|
-
'
|
|
89
|
-
'
|
|
90
|
-
'
|
|
91
|
-
'
|
|
92
|
-
'search.
|
|
93
|
-
'
|
|
94
|
-
'
|
|
95
|
-
'
|
|
96
|
-
'
|
|
97
|
-
'
|
|
98
|
-
'
|
|
99
|
-
'
|
|
100
|
-
'
|
|
101
|
-
'
|
|
102
|
-
|
|
103
|
-
|
|
1
|
+
/** Product copy for the merged tool-call rows. */
|
|
2
|
+
export declare const zh: {
|
|
3
|
+
running: string;
|
|
4
|
+
failed: string;
|
|
5
|
+
stopped: string;
|
|
6
|
+
expand: string;
|
|
7
|
+
collapse: string;
|
|
8
|
+
more: string;
|
|
9
|
+
showLess: string;
|
|
10
|
+
mergedCount: string;
|
|
11
|
+
countFiles: string;
|
|
12
|
+
countQueries: string;
|
|
13
|
+
countCommands: string;
|
|
14
|
+
countPrograms: string;
|
|
15
|
+
countCalls: string;
|
|
16
|
+
copy: string;
|
|
17
|
+
copied: string;
|
|
18
|
+
'codeBlock.title': string;
|
|
19
|
+
'codeBlock.wrap': string;
|
|
20
|
+
'codeBlock.unwrap': string;
|
|
21
|
+
'terminal.signal': string;
|
|
22
|
+
'terminal.exitCode': string;
|
|
23
|
+
'terminal.noExitCode': string;
|
|
24
|
+
'terminal.running': string;
|
|
25
|
+
'terminal.failed': string;
|
|
26
|
+
'terminal.done': string;
|
|
27
|
+
'terminal.copy': string;
|
|
28
|
+
'terminal.copied': string;
|
|
29
|
+
'terminal.noOutput': string;
|
|
30
|
+
'terminal.collapseAria': string;
|
|
31
|
+
'terminal.collapse': string;
|
|
32
|
+
'terminal.expandAria': string;
|
|
33
|
+
'terminal.expandRest': string;
|
|
34
|
+
'read.window': string;
|
|
35
|
+
'read.collapseAria': string;
|
|
36
|
+
'read.expandAria': string;
|
|
37
|
+
'read.expandRest': string;
|
|
38
|
+
'search.paths': string;
|
|
39
|
+
'search.paths.truncated': string;
|
|
40
|
+
'search.matches': string;
|
|
41
|
+
'search.matches.truncated': string;
|
|
42
|
+
'search.noResults': string;
|
|
43
|
+
'search.collapseAria': string;
|
|
44
|
+
'search.expandAria': string;
|
|
45
|
+
'search.expandRest': string;
|
|
46
|
+
'diff.collapseAria': string;
|
|
47
|
+
'diff.expandAria': string;
|
|
48
|
+
'diff.expandRest': string;
|
|
49
|
+
'web.noResults': string;
|
|
50
|
+
'web.sourcesTruncated': string;
|
|
51
|
+
'web.http': string;
|
|
52
|
+
'web.contentTruncated': string;
|
|
53
|
+
'markdown.footnotes': string;
|
|
54
|
+
};
|
|
55
|
+
export type MergeToolCallsKey = keyof typeof zh;
|
|
56
|
+
export declare const en: {
|
|
57
|
+
running: string;
|
|
58
|
+
failed: string;
|
|
59
|
+
stopped: string;
|
|
60
|
+
expand: string;
|
|
61
|
+
collapse: string;
|
|
62
|
+
more: string;
|
|
63
|
+
showLess: string;
|
|
64
|
+
mergedCount: string;
|
|
65
|
+
countFiles: string;
|
|
66
|
+
countQueries: string;
|
|
67
|
+
countCommands: string;
|
|
68
|
+
countPrograms: string;
|
|
69
|
+
countCalls: string;
|
|
70
|
+
copy: string;
|
|
71
|
+
copied: string;
|
|
72
|
+
'codeBlock.title': string;
|
|
73
|
+
'codeBlock.wrap': string;
|
|
74
|
+
'codeBlock.unwrap': string;
|
|
75
|
+
'terminal.signal': string;
|
|
76
|
+
'terminal.exitCode': string;
|
|
77
|
+
'terminal.noExitCode': string;
|
|
78
|
+
'terminal.running': string;
|
|
79
|
+
'terminal.failed': string;
|
|
80
|
+
'terminal.done': string;
|
|
81
|
+
'terminal.copy': string;
|
|
82
|
+
'terminal.copied': string;
|
|
83
|
+
'terminal.noOutput': string;
|
|
84
|
+
'terminal.collapseAria': string;
|
|
85
|
+
'terminal.collapse': string;
|
|
86
|
+
'terminal.expandAria': string;
|
|
87
|
+
'terminal.expandRest': string;
|
|
88
|
+
'read.window': string;
|
|
89
|
+
'read.collapseAria': string;
|
|
90
|
+
'read.expandAria': string;
|
|
91
|
+
'read.expandRest': string;
|
|
92
|
+
'search.paths': string;
|
|
93
|
+
'search.paths.truncated': string;
|
|
94
|
+
'search.matches': string;
|
|
95
|
+
'search.matches.truncated': string;
|
|
96
|
+
'search.noResults': string;
|
|
97
|
+
'search.collapseAria': string;
|
|
98
|
+
'search.expandAria': string;
|
|
99
|
+
'search.expandRest': string;
|
|
100
|
+
'diff.collapseAria': string;
|
|
101
|
+
'diff.expandAria': string;
|
|
102
|
+
'diff.expandRest': string;
|
|
103
|
+
'web.noResults': string;
|
|
104
|
+
'web.sourcesTruncated': string;
|
|
105
|
+
'web.http': string;
|
|
106
|
+
'web.contentTruncated': string;
|
|
107
|
+
'markdown.footnotes': string;
|
|
108
|
+
};
|
|
109
|
+
export declare const NS = "merge-tool-calls";
|
|
@@ -1,49 +1,49 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Pure detection of a consecutive run of grouped tool calls in the chat flow,
|
|
3
|
-
* and the per-seat merged-group partition over it.
|
|
4
|
-
*
|
|
5
|
-
* A pure function of the chat snapshot (order + node store), so the merged
|
|
6
|
-
* display is deterministic under replay: the web layer recomputes it per frame.
|
|
7
|
-
* @module
|
|
8
|
-
*/
|
|
9
|
-
import type { ChatNodeStore, ToolCallBlock } from '@deepseek-ai/dsh-client-ui-chat/client';
|
|
10
|
-
import type { MergeGroupMode } from '../types.ts';
|
|
11
|
-
/** The wire tool name of a call in either lifecycle form (mirrors ui-tool). */
|
|
12
|
-
export declare function callNameOf(block: ToolCallBlock): string;
|
|
13
|
-
/** Whether the call's wire name is one of the grouped tools (empty = all). */
|
|
14
|
-
export declare function isGroupedTool(name: string, tools: readonly string[]): boolean;
|
|
15
|
-
/** One merged group: the group's first call plus its consecutive continuations. */
|
|
16
|
-
export interface ReadRun {
|
|
17
|
-
/** Whether this seat is the group's rendering head (the only seat that shows the card). */
|
|
18
|
-
readonly isFirst: boolean;
|
|
19
|
-
/** The group's root blocks in flow order (first + continuations). */
|
|
20
|
-
readonly blocks: readonly ToolCallBlock[];
|
|
21
|
-
}
|
|
22
|
-
/**
|
|
23
|
-
* Compute the merged group this call belongs to.
|
|
24
|
-
*
|
|
25
|
-
* 1. Locates this call's node in the chat order; null when it is not a chat
|
|
26
|
-
* tool-call node (e.g. a read dispatched as a subcall). The node key
|
|
27
|
-
* format stays a ui-conversation internal, so the seat finds itself by
|
|
28
|
-
* scanning the store for the tool-call node owning its call id instead of
|
|
29
|
-
* recomputing the key.
|
|
30
|
-
* 2. Walks backward/forward to the maximal consecutive run containing it. A
|
|
31
|
-
* call continues the run when it is a grouped tool AND same-tool-same-run:
|
|
32
|
-
* the identical wire name, or a sibling of the same known variant family
|
|
33
|
-
* (grep+glob, bash+pwsh, read+web_fetch…). Unknown names (variant
|
|
34
|
-
* `others`) only merge with themselves, so unrelated tools never share a
|
|
35
|
-
* card (`adjacent`: any consecutive run; `step`: same agent step as this
|
|
36
|
-
* call).
|
|
37
|
-
* 3. Partitions the run into `maxGroupSize`-sized groups; this call is the
|
|
38
|
-
* group's first only when it heads one of those partitions. Truncation
|
|
39
|
-
* therefore never orphans a call: the excess starts its own group.
|
|
40
|
-
*
|
|
41
|
-
* @param order - chat node key order.
|
|
42
|
-
* @param nodes - chat node store.
|
|
43
|
-
* @param myCallId - the call id of the seat asking about itself.
|
|
44
|
-
* @param tools - grouped wire tool names; empty means every tool.
|
|
45
|
-
* @param groupBy - grouping mode.
|
|
46
|
-
* @param maxGroupSize - per-group cap.
|
|
47
|
-
* @returns the group partition, or null when the call is not a chat tool-call node.
|
|
48
|
-
*/
|
|
49
|
-
export declare function readRun(order: readonly string[], nodes: ChatNodeStore, myCallId: string, tools: readonly string[], groupBy: MergeGroupMode, maxGroupSize: number): ReadRun | null;
|
|
1
|
+
/**
|
|
2
|
+
* Pure detection of a consecutive run of grouped tool calls in the chat flow,
|
|
3
|
+
* and the per-seat merged-group partition over it.
|
|
4
|
+
*
|
|
5
|
+
* A pure function of the chat snapshot (order + node store), so the merged
|
|
6
|
+
* display is deterministic under replay: the web layer recomputes it per frame.
|
|
7
|
+
* @module
|
|
8
|
+
*/
|
|
9
|
+
import type { ChatNodeStore, ToolCallBlock } from '@deepseek-ai/dsh-client-ui-chat/client';
|
|
10
|
+
import type { MergeGroupMode } from '../types.ts';
|
|
11
|
+
/** The wire tool name of a call in either lifecycle form (mirrors ui-tool). */
|
|
12
|
+
export declare function callNameOf(block: ToolCallBlock): string;
|
|
13
|
+
/** Whether the call's wire name is one of the grouped tools (empty = all). */
|
|
14
|
+
export declare function isGroupedTool(name: string, tools: readonly string[]): boolean;
|
|
15
|
+
/** One merged group: the group's first call plus its consecutive continuations. */
|
|
16
|
+
export interface ReadRun {
|
|
17
|
+
/** Whether this seat is the group's rendering head (the only seat that shows the card). */
|
|
18
|
+
readonly isFirst: boolean;
|
|
19
|
+
/** The group's root blocks in flow order (first + continuations). */
|
|
20
|
+
readonly blocks: readonly ToolCallBlock[];
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Compute the merged group this call belongs to.
|
|
24
|
+
*
|
|
25
|
+
* 1. Locates this call's node in the chat order; null when it is not a chat
|
|
26
|
+
* tool-call node (e.g. a read dispatched as a subcall). The node key
|
|
27
|
+
* format stays a ui-conversation internal, so the seat finds itself by
|
|
28
|
+
* scanning the store for the tool-call node owning its call id instead of
|
|
29
|
+
* recomputing the key.
|
|
30
|
+
* 2. Walks backward/forward to the maximal consecutive run containing it. A
|
|
31
|
+
* call continues the run when it is a grouped tool AND same-tool-same-run:
|
|
32
|
+
* the identical wire name, or a sibling of the same known variant family
|
|
33
|
+
* (grep+glob, bash+pwsh, read+web_fetch…). Unknown names (variant
|
|
34
|
+
* `others`) only merge with themselves, so unrelated tools never share a
|
|
35
|
+
* card (`adjacent`: any consecutive run; `step`: same agent step as this
|
|
36
|
+
* call).
|
|
37
|
+
* 3. Partitions the run into `maxGroupSize`-sized groups; this call is the
|
|
38
|
+
* group's first only when it heads one of those partitions. Truncation
|
|
39
|
+
* therefore never orphans a call: the excess starts its own group.
|
|
40
|
+
*
|
|
41
|
+
* @param order - chat node key order.
|
|
42
|
+
* @param nodes - chat node store.
|
|
43
|
+
* @param myCallId - the call id of the seat asking about itself.
|
|
44
|
+
* @param tools - grouped wire tool names; empty means every tool.
|
|
45
|
+
* @param groupBy - grouping mode.
|
|
46
|
+
* @param maxGroupSize - per-group cap.
|
|
47
|
+
* @returns the group partition, or null when the call is not a chat tool-call node.
|
|
48
|
+
*/
|
|
49
|
+
export declare function readRun(order: readonly string[], nodes: ChatNodeStore, myCallId: string, tools: readonly string[], groupBy: MergeGroupMode, maxGroupSize: number): ReadRun | null;
|
|
@@ -1,77 +1,90 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Merged tool-call row — the shadowed `tool.call.toolview` registrant.
|
|
3
|
-
*
|
|
4
|
-
* For the first call of a consecutive run of grouped tools, renders the run as
|
|
5
|
-
* one card (the first call's full row) plus one compact child row per
|
|
6
|
-
* continuation call. For a continuation call, renders nothing: the seat stays
|
|
7
|
-
* empty and the injected stylesheet collapses it out of the flow. When the
|
|
8
|
-
* call is not a chat tool-call node at all (e.g. dispatched as a subcall),
|
|
9
|
-
* falls back to a plain single row so the call never disappears.
|
|
10
|
-
*
|
|
11
|
-
* The row surface mirrors the built-in generic ToolRow: a variant title/icon
|
|
12
|
-
* plus the settled card (read/search/diff/terminal/web) or IN/OUT text. The
|
|
13
|
-
* card primitives' localized label props are built here from the plugin's own
|
|
14
|
-
* dictionary (the primitives are cordis-free and require complete labels).
|
|
15
|
-
*
|
|
16
|
-
* Everything here is a pure function of the chat snapshot + the frozen call
|
|
17
|
-
* slices (replay-deterministic); expand state is component-local view state.
|
|
18
|
-
* @module
|
|
19
|
-
*/
|
|
20
|
-
import { type ReactNode } from 'react';
|
|
21
|
-
import type { ToolCallBlock } from '@deepseek-ai/dsh-client-ui-chat/client';
|
|
22
|
-
import type { ToolCallViewProps } from '@deepseek-ai/dsh-client-ui-tool/client';
|
|
23
|
-
import type { PropsLocale } from '@deepseek-ai/dsh-client-ui-slots';
|
|
24
|
-
import type { MergeToolCallsConfig } from '../types.ts';
|
|
25
|
-
/** Locale seat and inject face of the merged row registration. */
|
|
26
|
-
export type MergedToolRowProps = ToolCallViewProps & PropsLocale<'merge-tool-calls'> & {
|
|
27
|
-
readonly cfg: MergeToolCallsConfig;
|
|
28
|
-
};
|
|
29
|
-
/**
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
*
|
|
74
|
-
*
|
|
75
|
-
*
|
|
76
|
-
|
|
77
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Merged tool-call row — the shadowed `tool.call.toolview` registrant.
|
|
3
|
+
*
|
|
4
|
+
* For the first call of a consecutive run of grouped tools, renders the run as
|
|
5
|
+
* one card (the first call's full row) plus one compact child row per
|
|
6
|
+
* continuation call. For a continuation call, renders nothing: the seat stays
|
|
7
|
+
* empty and the injected stylesheet collapses it out of the flow. When the
|
|
8
|
+
* call is not a chat tool-call node at all (e.g. dispatched as a subcall),
|
|
9
|
+
* falls back to a plain single row so the call never disappears.
|
|
10
|
+
*
|
|
11
|
+
* The row surface mirrors the built-in generic ToolRow: a variant title/icon
|
|
12
|
+
* plus the settled card (read/search/diff/terminal/web) or IN/OUT text. The
|
|
13
|
+
* card primitives' localized label props are built here from the plugin's own
|
|
14
|
+
* dictionary (the primitives are cordis-free and require complete labels).
|
|
15
|
+
*
|
|
16
|
+
* Everything here is a pure function of the chat snapshot + the frozen call
|
|
17
|
+
* slices (replay-deterministic); expand state is component-local view state.
|
|
18
|
+
* @module
|
|
19
|
+
*/
|
|
20
|
+
import { type ReactNode } from 'react';
|
|
21
|
+
import type { ToolCallBlock } from '@deepseek-ai/dsh-client-ui-chat/client';
|
|
22
|
+
import type { StartedToolCallViewProps, ToolCallViewProps } from '@deepseek-ai/dsh-client-ui-tool/client';
|
|
23
|
+
import type { PropsLocale } from '@deepseek-ai/dsh-client-ui-slots';
|
|
24
|
+
import type { MergeToolCallsConfig } from '../types.ts';
|
|
25
|
+
/** Locale seat and inject face of the merged row registration. */
|
|
26
|
+
export type MergedToolRowProps = ToolCallViewProps & PropsLocale<'merge-tool-calls'> & {
|
|
27
|
+
readonly cfg: MergeToolCallsConfig;
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* Props of the dispatched arm. The preparing stage carries no dispatched
|
|
31
|
+
* arguments, so only `start`/`result` reach the argument-reading row.
|
|
32
|
+
*/
|
|
33
|
+
export type DispatchedMergedRowProps = StartedToolCallViewProps & PropsLocale<'merge-tool-calls'> & {
|
|
34
|
+
readonly cfg: MergeToolCallsConfig;
|
|
35
|
+
};
|
|
36
|
+
/**
|
|
37
|
+
* The run's main card: the first call's chrome (variant title/icon + state)
|
|
38
|
+
* plus, for a single call, its expandable content card. For a merged run the
|
|
39
|
+
* main row's collapsed summary is the count (`Read · 5 Files`) and the
|
|
40
|
+
* expanded body is the child-rows block (passed in as `children`); the first
|
|
41
|
+
* call is rendered as the first child row so every file path lands on a child
|
|
42
|
+
* row, never on the main row.
|
|
43
|
+
*/
|
|
44
|
+
export declare const RowCard: import("react").NamedExoticComponent<{
|
|
45
|
+
toolName: string;
|
|
46
|
+
block: ToolCallBlock;
|
|
47
|
+
cwd: string | undefined;
|
|
48
|
+
home: string | undefined;
|
|
49
|
+
openFile: (path: string) => void;
|
|
50
|
+
inspect: (() => void) | undefined;
|
|
51
|
+
t: MergedToolRowProps["t"];
|
|
52
|
+
/** Continuation-call count; 0 means a single-call row (no child rows). */
|
|
53
|
+
mergedCount: number;
|
|
54
|
+
/** Child rows for the merged run (all calls, including the first). */
|
|
55
|
+
children?: ReactNode;
|
|
56
|
+
}>;
|
|
57
|
+
/**
|
|
58
|
+
* One compact continuation row: the main row's tail structure ([sep dot][path]).
|
|
59
|
+
* An expandable call toggles the inline content card on click (mirroring the
|
|
60
|
+
* main row's whole-row disclosure); a read/write/edit-family path additionally
|
|
61
|
+
* renders as an open-file link (the sidebar preview) that stops propagation,
|
|
62
|
+
* exactly like the main row's summary link.
|
|
63
|
+
*/
|
|
64
|
+
export declare const ChildRow: import("react").NamedExoticComponent<{
|
|
65
|
+
toolName: string;
|
|
66
|
+
block: ToolCallBlock;
|
|
67
|
+
cwd: string | undefined;
|
|
68
|
+
home: string | undefined;
|
|
69
|
+
openFile: (path: string) => void;
|
|
70
|
+
t: MergedToolRowProps["t"];
|
|
71
|
+
}>;
|
|
72
|
+
/**
|
|
73
|
+
* The dispatched arm: renders the merged run card for the run's first call,
|
|
74
|
+
* nothing for continuation calls, and a plain single row when this call is not
|
|
75
|
+
* a chat tool-call node.
|
|
76
|
+
*
|
|
77
|
+
* Child-row alignment is measured at runtime, not hardcoded: the main row's
|
|
78
|
+
* separator dot sits after a variable-width title ("Read"/"Search"/"Bash"/…),
|
|
79
|
+
* so its column depends on the rendered font. A layout effect measures the
|
|
80
|
+
* dot's offset from the card root (once, plus on reflow via ResizeObserver)
|
|
81
|
+
* and indents the children so their dots and paths land on the main row's
|
|
82
|
+
* columns — no font/title constants to keep in sync.
|
|
83
|
+
*/
|
|
84
|
+
export declare function DispatchedMergedRow({ callId, toolName, block, cwd, home, openFile, inspect, t, cfg, useChat }: DispatchedMergedRowProps): import("react").JSX.Element | null;
|
|
85
|
+
/**
|
|
86
|
+
* The shadowed `tool.call.toolview` dispatch. The owner props are a three-phase
|
|
87
|
+
* union: a `preparing` call (no dispatched arguments) renders the lightweight
|
|
88
|
+
* arm, while `start`/`result` delegate to the dispatched arm.
|
|
89
|
+
*/
|
|
90
|
+
export declare function MergedToolRow(props: MergedToolRowProps): import("react").JSX.Element;
|
|
@@ -9,11 +9,17 @@
|
|
|
9
9
|
* IN/OUT text — which the merged row reproduces faithfully.
|
|
10
10
|
*
|
|
11
11
|
* Deliberately excluded: tools with custom row cards this plugin does not
|
|
12
|
-
* replicate (`skill`, `
|
|
13
|
-
*
|
|
14
|
-
* `
|
|
15
|
-
*
|
|
16
|
-
* explicitly.
|
|
12
|
+
* replicate (`skill`, `todo_write` / `ask_user_question` whose summary
|
|
13
|
+
* formatting is tool-specific, and the read-only Cordis inspection verbs
|
|
14
|
+
* `cordis_inspect_list` / `cordis_inspect_query` / `cordis_inspect_self`,
|
|
15
|
+
* which render through ui-tool's own details row). They keep their built-in
|
|
16
|
+
* rows unless the user names them in the `tools` config explicitly.
|
|
17
|
+
*
|
|
18
|
+
* The former dynamic Cordis verbs (`cordis_define`, `cordis_run`,
|
|
19
|
+
* `cordis_stop`, `cordis_undefine`, `cordis_inspect_self`) and their
|
|
20
|
+
* `cordis_package_inspect` / `cordis_runtime_inspect` inspection siblings no
|
|
21
|
+
* longer exist on the wire at 0.1.7-rc.1 (`tool-cordis` was narrowed to
|
|
22
|
+
* read-only inspection), so they are not listed here.
|
|
17
23
|
* @module
|
|
18
24
|
*/
|
|
19
25
|
/** Wire tool names merged by default (empty `tools` config = this list). */
|
package/lib/types/types.d.ts
CHANGED
|
@@ -6,8 +6,8 @@ export interface MergeToolCallsConfig {
|
|
|
6
6
|
/**
|
|
7
7
|
* Wire tool names whose consecutive calls merge. Empty = every built-in
|
|
8
8
|
* generic-family tool (read/grep/glob/edit/write/bash/pwsh/web_search/
|
|
9
|
-
* web_fetch/run_code
|
|
10
|
-
*
|
|
9
|
+
* web_fetch/run_code); a non-empty list is an explicit whitelist (any wire
|
|
10
|
+
* name works).
|
|
11
11
|
*/
|
|
12
12
|
readonly tools: readonly string[];
|
|
13
13
|
/** `adjacent`: any consecutive run in the chat flow; `step`: only within one agent step. */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@huanlin/dsh-plugin-merge-tool-calls",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.2",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -47,13 +47,12 @@
|
|
|
47
47
|
"peerDependencies": {
|
|
48
48
|
"@deepseek-ai/cordis": "^4.0.1",
|
|
49
49
|
"react": "^18.2.0",
|
|
50
|
-
"
|
|
51
|
-
"@deepseek-ai/dsh-client-
|
|
52
|
-
"@deepseek-ai/dsh-client-ui-
|
|
53
|
-
"@deepseek-ai/dsh-client-ui-
|
|
54
|
-
"@deepseek-ai/dsh-client-ui-
|
|
55
|
-
"@deepseek-ai/dsh-client-ui-
|
|
56
|
-
"@deepseek-ai/dsh-client-ui-tool": "^0.1.5-rc.1"
|
|
50
|
+
"@deepseek-ai/dsh-client-locale": "^0.1.7-rc.1",
|
|
51
|
+
"@deepseek-ai/dsh-client-ui-chat": "^0.1.7-rc.1",
|
|
52
|
+
"@deepseek-ai/dsh-client-ui-primitives": "^0.1.7-rc.1",
|
|
53
|
+
"@deepseek-ai/dsh-client-ui-renderer": "^0.1.7-rc.1",
|
|
54
|
+
"@deepseek-ai/dsh-client-ui-slots": "^0.1.7-rc.1",
|
|
55
|
+
"@deepseek-ai/dsh-client-ui-tool": "^0.1.7-rc.1"
|
|
57
56
|
},
|
|
58
57
|
"peerDependenciesMeta": {
|
|
59
58
|
"@deepseek-ai/cordis": {
|
|
@@ -62,9 +61,6 @@
|
|
|
62
61
|
"react": {
|
|
63
62
|
"optional": true
|
|
64
63
|
},
|
|
65
|
-
"schemastery": {
|
|
66
|
-
"optional": true
|
|
67
|
-
},
|
|
68
64
|
"@deepseek-ai/dsh-client-locale": {
|
|
69
65
|
"optional": true
|
|
70
66
|
},
|
|
@@ -85,13 +81,12 @@
|
|
|
85
81
|
}
|
|
86
82
|
},
|
|
87
83
|
"devDependencies": {
|
|
88
|
-
"@deepseek-ai/schemastery": "^3.18.
|
|
84
|
+
"@deepseek-ai/schemastery": "^3.18.4",
|
|
89
85
|
"@types/node": "^22.20.1",
|
|
90
86
|
"@types/react": "~18.3.31",
|
|
91
87
|
"jsdom": "^26.0.0",
|
|
92
88
|
"react": "^18.2.0",
|
|
93
89
|
"react-dom": "^18.2.0",
|
|
94
|
-
"schemastery": "^3.18.0",
|
|
95
90
|
"tsdown": "^0.15.0",
|
|
96
91
|
"typescript": "^5.9.0",
|
|
97
92
|
"vitest": "^3.2.0"
|