@xiaoso/dsh-tool-plus 0.1.8-beta.2 → 0.1.8-beta.4

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/lib/index.mjs CHANGED
@@ -3,7 +3,7 @@ __installBunShim();
3
3
  import { n as fs_promises_shim_exports, t as exists } from "./fs-promises-shim-Bx0fpxuk.mjs";
4
4
  import { i as setRuntimeLogger, n as systemChromiumCandidatesForTest, r as runtimeLogger } from "./launch-Uq7920ng.mjs";
5
5
  import { $ as isEnoent, A as formatCount, C as warn, D as installBunShim, F as $flag, N as $env, O as formatAge, P as $envpos, Q as hasFsCode, U as getAutoQaDbPath, V as VERSION, X as getRemoteDir, Y as getPuppeteerDir, at as findOnPath, b as debug, c as combineSignals, d as $which, et as isEnotdir, it as untilAborted, k as formatBytes$1, l as exec, m as readImageMetadata, nt as peekFile, q as getInstallId, tt as isProbablyBinary, u as render, x as error } from "./src-DUUqyo9y.mjs";
6
- import { C as truncateToWidth$1, S as replaceTabs, _ as formatCodeFrameLine, a as fetchBinary, b as LRUCache, c as getParallelExtractContent, d as convertFileWithMarkit, f as Settings, g as capParseErrors, h as OMP_DEFAULTS, i as convertWithMarkit, l as ensureTool, m as settings, o as extractWithParallel, p as isSettingsInitialized, s as findParallelApiKey, u as CONVERTIBLE_EXTENSIONS, v as formatParseErrors, x as padding, y as shortenPath } from "./utils-C-Lo_JC6.mjs";
6
+ import { C as truncateToWidth$1, S as replaceTabs, _ as formatCodeFrameLine, a as fetchBinary, b as LRUCache, c as getParallelExtractContent, d as convertFileWithMarkit, f as Settings, g as capParseErrors, h as OMP_DEFAULTS, i as convertWithMarkit, l as ensureTool, m as settings, o as extractWithParallel, p as isSettingsInitialized, s as findParallelApiKey, u as CONVERTIBLE_EXTENSIONS, v as formatParseErrors, x as padding, y as shortenPath } from "./utils-CdKv-8uE.mjs";
7
7
  import { t as sanitizeText } from "./sanitize-text-BCf5KmCf.mjs";
8
8
  import { n as isRecord$5 } from "./type-guards-CttAANEx.mjs";
9
9
  import { n as ToolError, r as throwIfAborted, t as ToolAbortError } from "./tool-errors-DoyxivAR.mjs";
@@ -10317,7 +10317,7 @@ let specialHandlersPromise;
10317
10317
  * requires a special handler, so we keep them out of the cold-startup graph.
10318
10318
  */
10319
10319
  function loadSpecialHandlers() {
10320
- specialHandlersPromise ??= import("./scrapers-DU4u4-Co.mjs").then((m) => m.specialHandlers);
10320
+ specialHandlersPromise ??= import("./scrapers-BWgeG8qC.mjs").then((m) => m.specialHandlers);
10321
10321
  return specialHandlersPromise;
10322
10322
  }
10323
10323
  /**
@@ -3,7 +3,7 @@ __installBunShim();
3
3
  import { n as fs_promises_shim_exports } from "./fs-promises-shim-Bx0fpxuk.mjs";
4
4
  import { $ as isEnoent, B as USER_AGENT, C as warn, G as getDocsRsCacheDir, N as $env, c as combineSignals, j as formatNumber, k as formatBytes, l as exec, s as Snowflake, y as parseFrontmatter } from "./src-DUUqyo9y.mjs";
5
5
  import { W as tryParseJson } from "./utils-BMmwLB0f.mjs";
6
- import { a as fetchBinary, c as getParallelExtractContent, i as convertWithMarkit, l as ensureTool, m as settings, n as asRecord, o as extractWithParallel, r as asString, s as findParallelApiKey, t as asNumber } from "./utils-C-Lo_JC6.mjs";
6
+ import { a as fetchBinary, c as getParallelExtractContent, i as convertWithMarkit, l as ensureTool, m as settings, n as asRecord, o as extractWithParallel, r as asString, s as findParallelApiKey, t as asNumber } from "./utils-CdKv-8uE.mjs";
7
7
  import { n as isRecord } from "./type-guards-CttAANEx.mjs";
8
8
  import { r as throwIfAborted, t as ToolAbortError } from "./tool-errors-DoyxivAR.mjs";
9
9
  import { c as getLocalizedText, d as looksLikeHtml, i as decodeHtmlEntities, l as htmlToBasicMarkdown, o as formatIsoDate, r as buildResult, s as formatMediaDuration, u as loadPage } from "./types-DT9vgZ3S.mjs";
@@ -3,9 +3,11 @@
3
3
  *
4
4
  * The shipped `ToolRow` is not reusable from a plugin (ui-tool is not part of
5
5
  * the client platform baseline), so this is our own: one 24px header line
6
- * (state dot + title + separator + ellipsized summary + optional `+N -M`
6
+ * (tool glyph + title + separator + ellipsized summary + optional `+N -M`
7
7
  * suffix + clickable path), a keyboard-reachable disclosure, and a body that
8
- * is either the card a row built or the flattened result text.
8
+ * is either the card a row built or the flattened result text. The leading
9
+ * glyph gives way to a state dot on a failed or interrupted call, and the row
10
+ * sweeps while the call runs, as the shipped row does.
9
11
  *
10
12
  * Two properties matter more than the visuals:
11
13
  * - **Never throw.** Every value is coerced defensively, and {@link CardBoundary}
@@ -23,8 +25,10 @@ import { type CardBlockView, type CardOpenFileOptions, type CardState, type Card
23
25
  export interface ToolCardShellProps {
24
26
  /** Card translate seat. */
25
27
  t: CardTranslate;
26
- /** Run state driving the leading dot and the status word. */
28
+ /** Run state driving the leading mark and the status word. */
27
29
  state: CardState;
30
+ /** Wire tool name selecting the leading glyph; absent/unknown = the generic glyph. */
31
+ tool?: string | null | undefined;
28
32
  /** Single-line title (the tool name). */
29
33
  title: string;
30
34
  /** Collapsed summary after the separator; empty renders no separator. */
@@ -64,6 +68,12 @@ export interface GenericCardProps {
64
68
  block: CardBlockView;
65
69
  /** The call's parsed arguments, when there are any. */
66
70
  args: Record<string, unknown> | null;
71
+ /** Wire tool name selecting the leading glyph; absent/unknown = the generic glyph. */
72
+ toolName?: string | null | undefined;
73
+ /** Session workspace root, so a stated path is shortened the rows' way. */
74
+ cwd?: string | undefined;
75
+ /** Opens the call's file in the host's viewer; absent = the path is plain text. */
76
+ openFile?: ((path: string, options?: CardOpenFileOptions) => void) | undefined;
67
77
  /** Jump to this call in the trajectory view. */
68
78
  inspect?: (() => void) | undefined;
69
79
  }
@@ -73,11 +83,11 @@ export interface GenericCardProps {
73
83
  * A card is only drawn once its metadata passed a `narrow*` guard, so anything
74
84
  * else — a running call, a window-truncated call, a Code Dispatch child, a
75
85
  * failure, a payload from another plugin version — lands here with the call's
76
- * own title, run state, argument count, and result text.
86
+ * own title, run state, the fact its arguments state, and result text.
77
87
  * @param props - see {@link GenericCardProps}.
78
88
  * @returns the generic shell.
79
89
  */
80
- export declare function GenericCard({ t, title, block, args, inspect }: GenericCardProps): import("react").JSX.Element;
90
+ export declare function GenericCard({ t, title, block, args, toolName, cwd, openFile, inspect }: GenericCardProps): import("react").JSX.Element;
81
91
  /** Props of {@link CardBoundary}. */
82
92
  export interface CardBoundaryProps {
83
93
  /** Card translate seat, forwarded to the fallback shell. */
@@ -17,7 +17,7 @@
17
17
  /** Locale namespace of the tool-card bundle (registered by `registerToolCards`). */
18
18
  export declare const CARD_LOCALE_NS = "tool-plus-cards";
19
19
  /** Every copy key of the tool-card namespace. */
20
- export type ToolCardLocaleKey = 'copy' | 'copied' | 'collapse' | 'expand' | 'collapseAria' | 'expandAria' | 'expandRest' | 'files.one' | 'files.other' | 'running' | 'done' | 'failed' | 'cancelled' | 'timedOut' | 'noOutput' | 'title.bash' | 'title.read' | 'title.write' | 'title.edit' | 'title.grep' | 'title.glob' | 'title.astGrep' | 'title.astEdit' | 'write.lines' | 'write.madeExecutable' | 'astEdit.replacements' | 'astEdit.files' | 'astEdit.parseErrors' | 'read.window' | 'read.collapseAria' | 'read.expandAria' | 'read.expandRest' | 'search.paths' | 'search.paths.truncated' | 'search.matches' | 'search.matches.truncated' | 'search.noResults' | 'search.collapseAria' | 'search.expandAria' | 'search.expandRest' | 'terminal.signal' | 'terminal.exitCode' | 'terminal.running' | 'terminal.failed' | 'terminal.done' | 'terminal.noOutput' | 'bash.background' | 'image.loading' | 'image.loadFailed' | 'image.open' | 'image.openNamed' | 'image.dialog' | 'image.close' | 'image.unnamed' | 'image.caption' | 'generic.params' | 'generic.noDetail' | 'inspect';
20
+ export type ToolCardLocaleKey = 'copy' | 'copied' | 'collapse' | 'expand' | 'collapseAria' | 'expandAria' | 'expandRest' | 'files.one' | 'files.other' | 'running' | 'done' | 'failed' | 'stopped' | 'cancelled' | 'timedOut' | 'noOutput' | 'title.bash' | 'title.read' | 'title.write' | 'title.edit' | 'title.grep' | 'title.glob' | 'title.astGrep' | 'title.astEdit' | 'write.lines' | 'write.madeExecutable' | 'astEdit.replacements' | 'astEdit.files' | 'astEdit.parseErrors' | 'astEdit.rules' | 'astEdit.rulesRest' | 'read.window' | 'read.collapseAria' | 'read.expandAria' | 'read.expandRest' | 'search.paths' | 'search.paths.truncated' | 'search.matches' | 'search.matches.truncated' | 'search.noResults' | 'search.scope' | 'search.collapseAria' | 'search.expandAria' | 'search.expandRest' | 'terminal.signal' | 'terminal.exitCode' | 'terminal.running' | 'terminal.failed' | 'terminal.done' | 'terminal.noOutput' | 'bash.background' | 'image.loading' | 'image.loadFailed' | 'image.open' | 'image.openNamed' | 'image.dialog' | 'image.close' | 'image.unnamed' | 'image.caption' | 'generic.params' | 'generic.noDetail' | 'inspect';
21
21
  /** Simplified Chinese copy (the source dictionary). */
22
22
  export declare const zh: Record<ToolCardLocaleKey, string>;
23
23
  /** English dictionary, checked complete against the zh key set. */
@@ -14,7 +14,7 @@
14
14
  * nothing here touches a raw `meta` field directly.
15
15
  * @module @xiaoso/dsh-tool-plus/web/client/row-utils
16
16
  */
17
- import type { DiffBlockLabels, ReadBlockLabels, SearchBlockLabels, StateDotState, TerminalBlockLabels } from '@deepseek-ai/dsh-client-ui-primitives';
17
+ import type { DiffBlockLabels, ReadBlockLabels, SearchBlockLabels, TerminalBlockLabels } from '@deepseek-ai/dsh-client-ui-primitives';
18
18
  import type { TranslateNS } from '@deepseek-ai/dsh-client-ui-slots';
19
19
  import type { CARD_LOCALE_NS, ToolCardLocaleKey } from './labels.ts';
20
20
  /** Translate seat of this plugin's card namespace. */
@@ -36,12 +36,30 @@ export interface CardBlockView {
36
36
  } | null;
37
37
  readonly content?: unknown;
38
38
  readonly isError?: unknown;
39
+ /**
40
+ * Settled failure detail. A turn stopped mid-call is projected as a settled
41
+ * `isError` block carrying `code: 'interrupted'`, which is a stop, not a
42
+ * failure — the shipped row model reads this before `isError`.
43
+ */
44
+ readonly error?: unknown;
39
45
  readonly meta?: unknown;
40
46
  }
41
47
  /** Card run state, one step off the shipped `ToolRowState` (no `stopped`). */
42
48
  export type CardState = 'running' | 'ok' | 'error' | 'warning';
43
49
  /** Whether a block is the settled half of a call pair. */
44
50
  export declare function isSettled(block: CardBlockView): boolean;
51
+ /**
52
+ * The call's original argument text.
53
+ *
54
+ * A running call carries it directly; a settled result carries the head
55
+ * backfilled from the in-window `tool/call`, which is absent when window
56
+ * truncation left that event outside. The text outlives the parse: a call whose
57
+ * arguments are still streaming is not valid JSON yet, and the shell states its
58
+ * first line rather than pretending the call said nothing.
59
+ * @param block - the frozen running-or-settled call node.
60
+ * @returns the argument text, or `''` when no head survives.
61
+ */
62
+ export declare function cardArgsRaw(block: CardBlockView): string;
45
63
  /**
46
64
  * Parse the call's raw argument JSON.
47
65
  *
@@ -55,17 +73,19 @@ export declare function parseCardArgs(block: CardBlockView): Record<string, unkn
55
73
  /**
56
74
  * Run state of one call.
57
75
  *
58
- * A settled `isError` result is an error; a foreground command that timed out
59
- * or was cancelled is amber rather than green (the shipped terminal model
60
- * reads only the trailing exit marker, which is exactly what the card owner
61
- * was told not to trust). A non-zero exit stays `ok`: bash reports a failing
62
- * command as result data, and the card's own status pill carries the red.
76
+ * A turn stopped mid-call is projected as a settled `isError` block carrying
77
+ * `error.code === 'interrupted'`; the shipped row model reads that before
78
+ * `isError`, so a stopped call is amber and named "stopped" rather than failed.
79
+ * Any other settled `isError` result is an error. A foreground command that
80
+ * timed out or was cancelled is amber rather than green (the shipped terminal
81
+ * model reads only the trailing exit marker, which is exactly what the card
82
+ * owner was told not to trust). A non-zero exit stays `ok`: bash reports a
83
+ * failing command as result data, and the card's own status pill carries the
84
+ * red.
63
85
  * @param block - the frozen running-or-settled call node.
64
86
  * @returns the card run state.
65
87
  */
66
88
  export declare function cardState(block: CardBlockView): CardState;
67
- /** Map a card run state onto the primitive's dot semantics. */
68
- export declare function dotState(state: CardState): StateDotState;
69
89
  /**
70
90
  * The assistive-technology status word for a run state, or `null` when the
71
91
  * state is already carried by the row's content.
@@ -0,0 +1,37 @@
1
+ /**
2
+ * Row-leading treatment: which glyph a row leads with, and what replaces it
3
+ * when the call did not settle cleanly.
4
+ *
5
+ * The shipped `ToolRow` does not lead with a status dot. A clean or running row
6
+ * leads with its tool's own glyph, and only `error` / `stopped` swap that glyph
7
+ * for a `StateDot` (`ui-tool/src/client/tool/components/ToolRow.tsx::leadingFor`);
8
+ * the glyph per tool name comes from the shipped variant table
9
+ * (`ui-tool/src/client/tool/toolviews/GenericToolCard.tsx::VARIANT_ICONS`).
10
+ * This module is that rule and that table, kept pure so the mapping is testable
11
+ * under the Node runner — the component that draws it lives in
12
+ * `ToolCardShell`.
13
+ *
14
+ * Two of the eight card keys are this plugin's own tools, so they are absent
15
+ * from the shipped name table. They take the family whose shipped glyph
16
+ * describes the act — a structural search reads like `grep`, an atomic edit
17
+ * writes like `edit` — rather than the shipped `others` sparkle, which would
18
+ * make the two cards this plugin is the only home of look like unknown tools.
19
+ * @module @xiaoso/dsh-tool-plus/web/client/rows/card-leading
20
+ */
21
+ import type { CardState } from '../row-utils.ts';
22
+ /** Glyph families of the shipped leading table. */
23
+ export type CardLeadingGlyph = 'bash' | 'read' | 'edit' | 'search' | 'others';
24
+ /**
25
+ * Glyph family a row leads with.
26
+ * @param toolName - the call's wire tool name, when the node carries one.
27
+ * @returns the family, or `others` (the shipped generic glyph) for an unknown name.
28
+ */
29
+ export declare function leadingGlyph(toolName: string | null | undefined): CardLeadingGlyph;
30
+ /** What the leading box draws for one run state. */
31
+ export type CardLeadingKind = 'glyph' | 'error' | 'warning';
32
+ /**
33
+ * Whether a run state keeps the row's glyph or replaces it with a state dot.
34
+ * @param state - the card's run state.
35
+ * @returns the leading kind; `error` and `warning` are the two dot states.
36
+ */
37
+ export declare function leadingKind(state: CardState): CardLeadingKind;
@@ -0,0 +1,45 @@
1
+ /**
2
+ * Collapsed-fact builders for the two command-shaped cards: the command a
3
+ * `bash` description hides, and the rewrite rule an `ast_edit` preview only
4
+ * shows once expanded.
5
+ *
6
+ * Both cards collapse to one head line. `bash`'s head used to be the model's
7
+ * own `description` — a sentence about intent, never the command that ran — so
8
+ * the only way to learn what executed was to expand the card. `ast_edit`'s head
9
+ * names the file and the replacement count, and its body previews the *result*:
10
+ * the rule that produced that result lives only in the call's `ops` argument,
11
+ * which no card showed at all. Each builder recovers one fact from the call's
12
+ * own arguments, so nothing is inferred from output, and a call head that fell
13
+ * outside the session window degrades to the facts the card already holds.
14
+ * @module @xiaoso/dsh-tool-plus/web/client/rows/command-card-facts
15
+ */
16
+ import { type CardTranslate } from '../row-utils.ts';
17
+ /**
18
+ * The `bash` card's collapsed summary: what ran, placed after the sentence
19
+ * saying why.
20
+ *
21
+ * The command is the fact the head must carry, so the description can never be
22
+ * the whole summary — it is a prefix at most. Only its first line is used: a
23
+ * summary is one row high, and the rest of a multi-line command belongs to the
24
+ * expanded body, which draws the whole thing.
25
+ * @param description - the model's one-line intent, or `null` when absent.
26
+ * @param command - the command actually executed (never empty).
27
+ * @param outcome - the interruption word (`timedOut` / `cancelled`), or `null`.
28
+ * @returns the outcome alone when the run was interrupted; otherwise the
29
+ * description joined to the command's first line, or that line alone.
30
+ */
31
+ export declare function bashCardSummary(description: string | null, command: string, outcome: string | null): string;
32
+ /**
33
+ * The `ast_edit` card's rule line: the first usable `ops` entry, written the
34
+ * way the tool's own `ops` argument writes it (`pat → out`).
35
+ *
36
+ * Only the first rule is stated, with the count of the entries behind it: the
37
+ * card exists to preview one change, and a call may carry many rules whose
38
+ * patterns are whole AST fragments — listing them would bury the preview. The
39
+ * remaining count is the array tail, not the number of *usable* entries, so it
40
+ * always describes the call as it was made.
41
+ * @param args - the call's parsed arguments, or `null` when its head is gone.
42
+ * @param t - this plugin's card translate seat.
43
+ * @returns the rule line, or `null` when the call carries no usable rule.
44
+ */
45
+ export declare function astEditRuleLine(args: Record<string, unknown> | null, t: CardTranslate): string | null;
@@ -0,0 +1,52 @@
1
+ /**
2
+ * Collapsed-summary facts for the generic card — every row's degradation path.
3
+ *
4
+ * A call lands on the generic shell when its own card cannot be built: it is
5
+ * still running, its result carried no text, its metadata fell outside the
6
+ * session window, it is a Code Dispatch child, or the Host projected an
7
+ * interruption the card has no material for. In every one of those cases the
8
+ * call's ARGUMENTS are the only material left, and the shipped generic row
9
+ * answers them with the call's own fact: its variant's summary keys first, then
10
+ * ANY string the payload carries, then the first line of the raw argument text
11
+ * (`deriveSummary` in ui-tool's `tool-call-model.ts`). It never answers with an
12
+ * argument count.
13
+ *
14
+ * That is the rule here. The count it replaces told the reader nothing: a
15
+ * directory read, a `:raw` window, a running `grep` and a child call all
16
+ * collapsed to "1 个参数" — the one thing a degraded row must not do, since the
17
+ * head is then the only place the fact exists.
18
+ *
19
+ * The key preference follows THIS plugin's own tool schemas rather than the
20
+ * shipped `SUMMARY_KEYS`: our tools replaced the built-in ones with the OMP
21
+ * native parameter names (`read`/`write` take `path`, `ast_grep` takes `pat`,
22
+ * `ast_edit` takes `paths`), and the shipped table's `file_path` is what the
23
+ * built-in tools used. Both spellings are accepted, ours first, so a transcript
24
+ * recorded before the takeover still states its path.
25
+ * @module @xiaoso/dsh-tool-plus/web/client/rows/fallback-card-facts
26
+ */
27
+ import { type CardTranslate } from '../row-utils.ts';
28
+ /**
29
+ * The generic card's collapsed summary: the fact the call itself states.
30
+ * @param toolName - the call's wire tool name (empty when truncated).
31
+ * @param args - the call's parsed arguments, or `null` when its head is gone.
32
+ * @param cwd - the session workspace root, for shortening an absolute path.
33
+ * @param t - the card translate seat.
34
+ * @param raw - the call's original argument text, for a payload that is not
35
+ * valid JSON yet (a call still streaming its arguments) or whose only values
36
+ * are non-strings.
37
+ * @returns the collapsed summary text.
38
+ */
39
+ export declare function fallbackCardSummary(toolName: string | null | undefined, args: Record<string, unknown> | null, cwd: string | undefined, t: CardTranslate, raw?: string | null): string;
40
+ /**
41
+ * The real file a degraded file-backed row may offer to open — `null` when the
42
+ * call names no single file.
43
+ *
44
+ * The head states the call verbatim (selector included) while the link has to
45
+ * name a real file: the same split the read card itself makes between its
46
+ * summary and its link. Whether that file then previews is the side bar's
47
+ * decision, never this module's.
48
+ * @param toolName - the call's wire tool name.
49
+ * @param args - the call's parsed arguments, or `null`.
50
+ * @returns the file to open, or `null` when there is nothing to open.
51
+ */
52
+ export declare function fallbackCardLink(toolName: string | null | undefined, args: Record<string, unknown> | null): string | null;
@@ -0,0 +1,33 @@
1
+ /**
2
+ * Collapsed-summary facts for the `read` card.
3
+ *
4
+ * The Host projection strips the inline selector off the path
5
+ * (`stripReadSelector` in `web/host/read.ts`) because the card's *link* must
6
+ * point at a real file, and it keeps only the file's own window. The collapsed
7
+ * head is then the one place where the question the model actually asked is
8
+ * still readable — and the projected path cannot answer it: a windowed read of
9
+ * `package.json:22-25,31-34` and a whole-file read of `package.json` project to
10
+ * the very same string, so the card hides the difference.
11
+ *
12
+ * The summary is therefore built from the call's own argument, selector and
13
+ * all, with the projected path kept as the fallback for a result whose call
14
+ * head fell outside the session window (a truncated window carries no
15
+ * `tool/call` event, so no argument survives). That fallback states a fact the
16
+ * card already holds; nothing is invented.
17
+ * @module @xiaoso/dsh-tool-plus/web/client/rows/read-card-facts
18
+ */
19
+ /**
20
+ * The `read` card's collapsed summary: the path the model asked for, keeping
21
+ * whatever inline selector it carried (`:22-25`, `:raw`, `:conflicts`, `:28-`,
22
+ * a sqlite row, an archive member) and shortened against the workspace root.
23
+ *
24
+ * The selector is deliberately not validated against the read grammar: the head
25
+ * reports the call verbatim, and a selector this plugin does not recognize is
26
+ * still what the model typed — substituting the projection's stripped path
27
+ * would erase the evidence that two calls differ.
28
+ * @param args - the call's parsed arguments, or `null` when its head is gone.
29
+ * @param metaPath - the Host-projected path (already selector-free).
30
+ * @param cwd - the session workspace root, when known.
31
+ * @returns the workspace-shortened argument path, or the projected path.
32
+ */
33
+ export declare function readCardSummary(args: Record<string, unknown> | null, metaPath: string, cwd: string | undefined): string;
@@ -0,0 +1,37 @@
1
+ /**
2
+ * Collapsed-summary facts for the `grep` / `ast_grep` / `glob` cards.
3
+ *
4
+ * The row's summary is the search's *subject* — `pattern` for grep, `pat` for
5
+ * ast_grep, the path pattern for glob — so the one question the collapsed head
6
+ * could not answer is "which tree was searched?", and the counts sat in the
7
+ * folded body. That reads worst on an empty result: a bare `Grep · zzz` looks
8
+ * like a bad pattern rather than like a search of the wrong directory.
9
+ *
10
+ * Two facts therefore ride the head as a trailing fragment, after the summary
11
+ * and outside its ellipsis, because they are the parts a narrow row must never
12
+ * clip:
13
+ * - the scope, taken from the call's own `path` argument. Only `matches`
14
+ * shapes take it: a glob's `path` argument *is* its pattern, which the
15
+ * summary already shows, so repeating it as a scope would claim a second
16
+ * fact out of one argument. A call without `path` searched the workspace
17
+ * root — naming no scope is honest, inventing one is not;
18
+ * - the count, or "no results" instead of a zero count (a zero count is what
19
+ * the empty-state failure reads as, not what it says).
20
+ *
21
+ * The counting labels are the {@link searchBlockLabels} adapter the block body
22
+ * already uses, so the head and the body say the same thing in the same words,
23
+ * including the "showing N of M" wording of a capped payload.
24
+ * @module @xiaoso/dsh-tool-plus/web/client/rows/search-card-facts
25
+ */
26
+ import type { SearchCardMeta } from '../../contract.ts';
27
+ import type { CardTranslate } from '../row-utils.ts';
28
+ /**
29
+ * The search card's collapsed trailing fragment: the scope the call searched,
30
+ * then what the search found.
31
+ * @param args - the call's parsed arguments, or `null` when its head is gone.
32
+ * @param meta - the Host-projected search metadata (already narrowed).
33
+ * @param cwd - the session workspace root, for shortening an absolute scope.
34
+ * @param t - the card translate seat.
35
+ * @returns the joined fragment, or `null` when there is no fact to add.
36
+ */
37
+ export declare function searchCardSuffix(args: Record<string, unknown> | null, meta: SearchCardMeta, cwd: string | undefined, t: CardTranslate): string | null;
@@ -6267,7 +6267,7 @@ const settings = {
6267
6267
  };
6268
6268
  //#endregion
6269
6269
  //#region package.json
6270
- var version = "0.1.8-beta.2";
6270
+ var version = "0.1.8-beta.4";
6271
6271
  /** `.tmp` files older than this are treated as orphaned writes and swept. */
6272
6272
  const TMP_ORPHAN_MAX_AGE_MS = 3e5;
6273
6273
  function markitConversionCacheKey(bytes, extension) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@xiaoso/dsh-tool-plus",
3
3
  "description": "Oh My Pi bash runtime ported as a deepseek-harness tool plugin: persistent shell session, output minimizer, managed background jobs, command interception",
4
- "version": "0.1.8-beta.2",
4
+ "version": "0.1.8-beta.4",
5
5
  "license": "MIT",
6
6
  "keywords": [
7
7
  "deepseek-harness",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xiaoso/dsh-tool-plus-presets",
3
- "version": "0.1.8-beta.2",
3
+ "version": "0.1.8-beta.4",
4
4
  "description": "Agent-preset installer for dsh-tool-plus: installs the standard / PTC enhanced preset templates into a DeepSeek Harness home.",
5
5
  "license": "MIT",
6
6
  "keywords": [