@deepseek-ai/dsh-client-ui-tool 0.1.1-rc.2 → 0.1.2-alpha.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.
Files changed (28) hide show
  1. package/README.i18n.yaml +2 -2
  2. package/README.md +79 -17
  3. package/README.zh.md +80 -18
  4. package/lib/client.js +868 -418
  5. package/lib/types/client/apply.d.ts +3 -2
  6. package/lib/types/client/contract/slots.d.ts +13 -8
  7. package/lib/types/client/index.d.ts +1 -1
  8. package/lib/types/client/tool/ToolCallTree.d.ts +1 -1
  9. package/lib/types/client/tool/ToolDetails.d.ts +3 -3
  10. package/lib/types/client/tool/components/AskQuestionCard.d.ts +11 -0
  11. package/lib/types/client/tool/components/ToolRow.d.ts +7 -31
  12. package/lib/types/client/tool/models/ask-question-card-model.d.ts +22 -0
  13. package/lib/types/client/tool/models/diff-card-model.d.ts +7 -28
  14. package/lib/types/client/tool/models/primitive-labels.d.ts +36 -0
  15. package/lib/types/client/tool/models/raw-tool-call.d.ts +27 -0
  16. package/lib/types/client/tool/models/read-card-model.d.ts +4 -19
  17. package/lib/types/client/tool/models/search-card-model.d.ts +9 -75
  18. package/lib/types/client/tool/models/terminal-card-model.d.ts +46 -36
  19. package/lib/types/client/tool/models/tool-call-model.d.ts +22 -5
  20. package/lib/types/client/tool/models/web-card-model.d.ts +9 -34
  21. package/lib/types/client/tool/toolviews/ask-question-row.d.ts +2 -11
  22. package/lib/types/client/tool/toolviews/bash-sample.d.ts +2 -14
  23. package/lib/types/client/tool/toolviews/file-mutation-row.d.ts +2 -17
  24. package/lib/types/client/tool/toolviews/read-row.d.ts +2 -12
  25. package/lib/types/client/tool/toolviews/search-row.d.ts +2 -19
  26. package/lib/types/client/tool/toolviews/todo-row.d.ts +2 -13
  27. package/lib/types/client/tool/toolviews/web-row.d.ts +2 -14
  28. package/package.json +17 -19
@@ -1,22 +1,13 @@
1
1
  import type { Context } from '@deepseek-ai/cordis';
2
2
  import type { PropsLocale } from '@deepseek-ai/dsh-client-ui-slots';
3
3
  import type { ToolCallViewProps } from '../../contract/slots.ts';
4
- /** Full row props: the toolview runtime share plus the standard locale seat. */
5
4
  type AskQuestionRowProps = ToolCallViewProps & PropsLocale<'conversation'>;
6
- /** One-line question-interaction row (the whole row toggles the call's
7
- * Input/Output sections, ToolRow's unified expand). */
5
+ /** Summarizes a pending, answered, cancelled, or interrupted question set. */
8
6
  export declare function AskQuestionRow({ toolName, block, inspect, t }: AskQuestionRowProps): import("react").JSX.Element;
9
- /**
10
- * The ask-question row as a plain registrant plugin following the chat
11
- * toolview declaration across independent activation and reload lifetimes.
12
- */
7
+ /** Registers the ask-user-question conversation row. */
13
8
  export declare const askQuestionToolview: {
14
9
  name: string;
15
10
  inject: string[];
16
- /**
17
- * Register the ask-question row into the Tool-owned keyed view slot.
18
- * @param ctx - registrant context (disposal rides ctx.effect inside slots.register).
19
- */
20
11
  apply(ctx: Context): void;
21
12
  };
22
13
  export {};
@@ -1,25 +1,13 @@
1
1
  import type { Context } from '@deepseek-ai/cordis';
2
2
  import type { PropsLocale } from '@deepseek-ai/dsh-client-ui-slots';
3
3
  import type { ToolCallViewProps } from '../../contract/slots.ts';
4
- /** Bash row props: the toolview runtime share plus the standard locale seat. */
5
4
  type BashRowProps = ToolCallViewProps & PropsLocale<'conversation'>;
6
- /**
7
- * Bash row: icon + Bash · {description} in the shared ToolRow chrome, the
8
- * whole row toggling the command's terminal or generic error card (ToolRow's unified
9
- * expand interaction, replicated locally per the registrant posture).
10
- */
5
+ /** Renders expandable Bash output with an accessible lifecycle label. */
11
6
  export declare function BashRow({ toolName, block, sessionId, useSessions, inspect, t }: BashRowProps): import("react").JSX.Element;
12
- /**
13
- * The sample as a plain registrant plugin. Slot injection follows the chat
14
- * toolview declaration across independent activation and reload lifetimes.
15
- */
7
+ /** Registers the standalone Bash conversation-row sample. */
16
8
  export declare const bashToolviewSample: {
17
9
  name: string;
18
10
  inject: string[];
19
- /**
20
- * Register the bash row into the Tool-owned keyed view slot.
21
- * @param ctx - registrant context (disposal rides ctx.effect inside slots.register).
22
- */
23
11
  apply(ctx: Context): void;
24
12
  };
25
13
  export {};
@@ -1,30 +1,15 @@
1
1
  import type { Context } from '@deepseek-ai/cordis';
2
2
  import type { PropsLocale } from '@deepseek-ai/dsh-client-ui-slots';
3
3
  import type { ToolCallViewProps } from '../../contract/slots.ts';
4
- /** Full row props: the toolview runtime share plus the standard locale seat. */
5
4
  type FileMutationRowProps = ToolCallViewProps & PropsLocale<'conversation'>;
6
5
  /**
7
- * File-mutation row: icon + {Edit,Write} · {path} in the shared ToolRow chrome,
8
- * with the applied diff as the row's collapsed-by-default card body. The
9
- * summary is a path link (a file tool's interaction); the host's `openFile`
10
- * resolves it against the session cwd, so this passes the tool's own path
11
- * verbatim. An errored mutation has no diff card, so ToolRow surfaces the
12
- * model-facing error text through its Output section and its first line in the
13
- * collapsed summary instead.
6
+ * Lets users expand an applied file diff and open the reported path.
14
7
  */
15
8
  export declare function FileMutationRow({ toolName, block, cwd, home, openFile, inspect, t }: FileMutationRowProps): import("react").JSX.Element;
16
- /**
17
- * The file-mutation rows as a plain registrant plugin following the chat
18
- * toolview declaration across independent activation and reload lifetimes.
19
- */
9
+ /** Registers the edit and write conversation rows. */
20
10
  export declare const fileMutationToolview: {
21
11
  name: string;
22
12
  inject: string[];
23
- /**
24
- * Register the file-mutation row into the Tool-owned keyed view slot
25
- * under both mutation tool names.
26
- * @param ctx - registrant context (disposal rides ctx.effect inside slots.register).
27
- */
28
13
  apply(ctx: Context): void;
29
14
  };
30
15
  export {};
@@ -1,25 +1,15 @@
1
1
  import type { Context } from '@deepseek-ai/cordis';
2
2
  import type { PropsLocale } from '@deepseek-ai/dsh-client-ui-slots';
3
3
  import type { ToolCallViewProps } from '../../contract/slots.ts';
4
- /** Full row props: the toolview runtime share plus the standard locale seat. */
5
4
  type ReadRowProps = ToolCallViewProps & PropsLocale<'conversation'>;
6
5
  /**
7
- * Read row: icon + Read · {path} in the shared ToolRow chrome, with the file's
8
- * read card as the row's collapsed-by-default card body. The summary path is an
9
- * openable host link when the row names a single file.
6
+ * Lets users expand a completed read result and open its reported path.
10
7
  */
11
8
  export declare function ReadRow({ toolName, block, cwd, home, openFile, inspect, t }: ReadRowProps): import("react").JSX.Element;
12
- /**
13
- * The read row as a plain registrant plugin following the atomic Tool-view
14
- * declaration across independent activation and reload lifetimes.
15
- */
9
+ /** Registers the read tool's conversation row. */
16
10
  export declare const readToolview: {
17
11
  name: string;
18
12
  inject: string[];
19
- /**
20
- * Register the read row into the Tool-owned keyed view slot.
21
- * @param ctx - registrant context (disposal rides ctx.effect inside slots.register).
22
- */
23
13
  apply(ctx: Context): void;
24
14
  };
25
15
  export {};
@@ -1,30 +1,13 @@
1
1
  import type { Context } from '@deepseek-ai/cordis';
2
2
  import type { PropsLocale } from '@deepseek-ai/dsh-client-ui-slots';
3
3
  import type { ToolCallViewProps } from '../../contract/slots.ts';
4
- /** Full row props: the toolview runtime share plus the standard locale seat. */
5
4
  type SearchRowProps = ToolCallViewProps & PropsLocale<'conversation'>;
6
- /**
7
- * Search row: icon + Grep/Glob · {summary} in the shared ToolRow chrome, with the
8
- * completed search's card as the row's collapsed-by-default card body (a capped
9
- * search's recovery footer rides below it, inside ToolRow). Registered under
10
- * both `grep` and `glob`; the derived model's `kind` decides the card shape. A
11
- * settled call with no search card surfaces its model-facing text through
12
- * ToolRow's Output section, since the keyed SearchRow owns this render slot.
13
- */
5
+ /** Lets users expand grep or glob results and recover capped searches. */
14
6
  export declare function SearchRow({ toolName, block, inspect, t }: SearchRowProps): import("react").JSX.Element;
15
- /**
16
- * The search view follows the atomic Tool-view declaration across activation
17
- * and reload. One component registers under both keys because `grep` and
18
- * `glob` are the same visual object discriminated by the result view's `kind`.
19
- */
7
+ /** Registers the grep and glob conversation rows. */
20
8
  export declare const searchToolview: {
21
9
  name: string;
22
10
  inject: string[];
23
- /**
24
- * Register the search row into the Tool-owned keyed view slot under both
25
- * the `grep` and `glob` tool names.
26
- * @param ctx - registrant context (disposal rides ctx.effect inside slots.register).
27
- */
28
11
  apply(ctx: Context): void;
29
12
  };
30
13
  export {};
@@ -1,24 +1,13 @@
1
1
  import type { Context } from '@deepseek-ai/cordis';
2
2
  import type { PropsLocale } from '@deepseek-ai/dsh-client-ui-slots';
3
3
  import type { ToolCallViewProps } from '../../contract/slots.ts';
4
- /** Todo row props: the toolview runtime share plus the standard locale seat. */
5
4
  type TodoRowProps = ToolCallViewProps & PropsLocale<'conversation'>;
6
- /** One-line plan update row (the whole row toggles the call's Input/Output
7
- * sections, ToolRow's unified expand). Non-ok execution states keep the
8
- * shared row's dot semantics — a cancelled call wrote no todo/write, so it
9
- * must not read as a completed update. */
5
+ /** Summarizes a plan update without presenting a cancelled call as completed. */
10
6
  export declare function TodoRow({ toolName, block, inspect, t }: TodoRowProps): import("react").JSX.Element;
11
- /**
12
- * The todo row as a plain registrant plugin following the atomic Tool-view
13
- * declaration across independent activation and reload lifetimes.
14
- */
7
+ /** Registers the todo conversation row. */
15
8
  export declare const todoToolview: {
16
9
  name: string;
17
10
  inject: string[];
18
- /**
19
- * Register the todo row into the Tool-owned keyed view slot.
20
- * @param ctx - registrant context (disposal rides ctx.effect inside slots.register).
21
- */
22
11
  apply(ctx: Context): void;
23
12
  };
24
13
  export {};
@@ -1,25 +1,13 @@
1
1
  import type { Context } from '@deepseek-ai/cordis';
2
2
  import type { PropsLocale } from '@deepseek-ai/dsh-client-ui-slots';
3
3
  import type { ToolCallViewProps } from '../../contract/slots.ts';
4
- /** Full row props: the toolview runtime share plus the standard locale seat. */
5
4
  type WebRowProps = ToolCallViewProps & PropsLocale<'conversation'>;
6
- /**
7
- * Web row: icon + Search/Fetch · {summary} in the shared ToolRow chrome, with
8
- * the completed retrieval's web card as the row's collapsed-by-default card
9
- * body. The row discriminates on `toolName` only to pick its icon and title.
10
- */
5
+ /** Lets users expand a completed web search or fetch result. */
11
6
  export declare function WebRow({ toolName, block, inspect, t }: WebRowProps): import("react").JSX.Element;
12
- /**
13
- * The web rows follow the atomic Tool-view declaration across activation and
14
- * reload. One WebRow component registers under both web tool names.
15
- */
7
+ /** Registers the web search and fetch conversation rows. */
16
8
  export declare const webToolview: {
17
9
  name: string;
18
10
  inject: string[];
19
- /**
20
- * Register the web row under both web tool names' keyed toolview holes.
21
- * @param ctx - registrant context (disposal rides ctx.effect inside slots.register).
22
- */
23
11
  apply(ctx: Context): void;
24
12
  };
25
13
  export {};
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@deepseek-ai/dsh-client-ui-tool",
3
3
  "description": "Client Tool call-tree renderer and keyed per-tool presentation slot",
4
- "version": "0.1.1-rc.2",
4
+ "version": "0.1.2-alpha.2",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
@@ -32,8 +32,8 @@
32
32
  "dsh": {
33
33
  "client": {
34
34
  "inject": [
35
+ "@deepseek-ai/dsh-api-workspace-controller",
35
36
  "@deepseek-ai/dsh-client-connection",
36
- "@deepseek-ai/dsh-client-runtime",
37
37
  "@deepseek-ai/dsh-client-locale",
38
38
  "@deepseek-ai/dsh-client-ui-conversation"
39
39
  ],
@@ -45,29 +45,27 @@
45
45
  "clsx": "^2.0.0"
46
46
  },
47
47
  "peerDependencies": {
48
- "@deepseek-ai/cordis": "^4.0.1",
49
- "@deepseek-ai/dsh-api-remotes": "^0.1.1-rc.2",
50
- "@deepseek-ai/dsh-client-connection": "^0.1.1-rc.2",
51
- "@deepseek-ai/dsh-client-locale": "^0.1.1-rc.2",
52
- "@deepseek-ai/dsh-client-runtime": "^0.1.1-rc.2",
53
- "@deepseek-ai/dsh-client-ui-conversation": "^0.1.1-rc.2",
54
- "@deepseek-ai/dsh-invariants": "^0.1.1-rc.2"
48
+ "@deepseek-ai/cordis": "^4.0.2"
55
49
  },
56
50
  "devDependencies": {
57
51
  "@testing-library/react": "^16.1.0",
58
52
  "@types/react": "~18.3.1",
59
53
  "react": "^18.2.0",
60
54
  "react-dom": "^18.2.0",
61
- "@deepseek-ai/dsh-api-remotes": "^0.1.1-rc.2",
62
- "@deepseek-ai/cordis": "^4.0.1",
63
- "@deepseek-ai/dsh-client-connection": "^0.1.1-rc.2",
64
- "@deepseek-ai/dsh-client-locale": "^0.1.1-rc.2",
65
- "@deepseek-ai/dsh-client-runtime": "^0.1.1-rc.2",
66
- "@deepseek-ai/dsh-client-test-runtime": "^0.1.1-rc.2",
67
- "@deepseek-ai/dsh-client-ui-conversation": "^0.1.1-rc.2",
68
- "@deepseek-ai/dsh-client-ui-primitives": "^0.1.1-rc.2",
69
- "@deepseek-ai/dsh-invariants": "^0.1.1-rc.2",
70
- "@deepseek-ai/dsh-client-ui-slots": "^0.1.1-rc.2"
55
+ "@deepseek-ai/dsh-api-remotes": "^0.1.2-alpha.2",
56
+ "@deepseek-ai/dsh-client-connection": "^0.1.2-alpha.2",
57
+ "@deepseek-ai/dsh-client-locale": "^0.1.2-alpha.2",
58
+ "@deepseek-ai/dsh-client-test-runtime": "^0.1.2-alpha.2",
59
+ "@deepseek-ai/dsh-client-ui-conversation": "^0.1.2-alpha.2",
60
+ "@deepseek-ai/cordis": "^4.0.2",
61
+ "@deepseek-ai/dsh-client-ui-slots": "^0.1.2-alpha.2",
62
+ "@deepseek-ai/dsh-api-workspace-controller": "^0.1.2-alpha.2",
63
+ "@deepseek-ai/dsh-client-ui-chat": "^0.1.2-alpha.2",
64
+ "@deepseek-ai/dsh-client-ui-renderer": "^0.1.2-alpha.2",
65
+ "@deepseek-ai/dsh-invariants": "^0.1.2-alpha.2",
66
+ "@deepseek-ai/dsh-util-workspace-path": "^0.1.2-alpha.2",
67
+ "@deepseek-ai/dsh-client-ui-primitives": "^0.1.2-alpha.2",
68
+ "@deepseek-ai/dsh-client-ui-session": "^0.1.2-alpha.2"
71
69
  },
72
70
  "files": [
73
71
  "lib/index.js",