@mrclrchtr/supi-code-intelligence 11.3.0 → 12.0.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/CHANGELOG.md +33 -0
- package/README.md +15 -9
- package/node_modules/@mrclrchtr/supi-code-runtime/package.json +1 -1
- package/node_modules/@mrclrchtr/supi-code-runtime/src/api.ts +3 -1
- package/node_modules/@mrclrchtr/supi-code-runtime/src/declaration-level.ts +34 -0
- package/node_modules/@mrclrchtr/supi-code-runtime/src/types.ts +64 -28
- package/node_modules/@mrclrchtr/supi-core/package.json +1 -1
- package/node_modules/@mrclrchtr/supi-lsp/README.md +22 -17
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-code-runtime/package.json +1 -1
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-code-runtime/src/api.ts +3 -1
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-code-runtime/src/declaration-level.ts +34 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-code-runtime/src/types.ts +64 -28
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-core/package.json +1 -1
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/semver/classes/range.js +2 -2
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/semver/internal/constants.js +30 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/semver/internal/trim-comparator-whitespace.js +438 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/semver/package.json +1 -1
- package/node_modules/@mrclrchtr/supi-lsp/package.json +3 -3
- package/node_modules/@mrclrchtr/supi-lsp/src/api.ts +2 -2
- package/node_modules/@mrclrchtr/supi-lsp/src/client/client-diagnostic-capabilities.ts +13 -3
- package/node_modules/@mrclrchtr/supi-lsp/src/client/client-diagnostics.ts +25 -9
- package/node_modules/@mrclrchtr/supi-lsp/src/client/client-document-sync.ts +7 -5
- package/node_modules/@mrclrchtr/supi-lsp/src/client/client-edit-capture.ts +258 -0
- package/node_modules/@mrclrchtr/supi-lsp/src/client/client.ts +64 -11
- package/node_modules/@mrclrchtr/supi-lsp/src/config/capabilities.ts +8 -0
- package/node_modules/@mrclrchtr/supi-lsp/src/config/operation-support.ts +48 -79
- package/node_modules/@mrclrchtr/supi-lsp/src/config/tsconfig-scope.ts +10 -0
- package/node_modules/@mrclrchtr/supi-lsp/src/manager/manager-typescript-coverage.ts +118 -0
- package/node_modules/@mrclrchtr/supi-lsp/src/manager/manager.ts +67 -3
- package/node_modules/@mrclrchtr/supi-lsp/src/manager/typescript-file-local.ts +87 -0
- package/node_modules/@mrclrchtr/supi-lsp/src/provider/lsp-refactor-provider.ts +21 -35
- package/node_modules/@mrclrchtr/supi-lsp/src/provider/refactor-command-capture.ts +139 -0
- package/node_modules/@mrclrchtr/supi-lsp/src/provider/refactor-planning.ts +202 -47
- package/node_modules/@mrclrchtr/supi-lsp/src/provider/semantic-symbol-mapper.ts +22 -17
- package/node_modules/@mrclrchtr/supi-lsp/src/session/route-boundary.ts +26 -0
- package/node_modules/@mrclrchtr/supi-lsp/src/session/runtime-registry.ts +106 -16
- package/node_modules/@mrclrchtr/supi-lsp/src/session/runtime-rename.ts +3 -0
- package/node_modules/@mrclrchtr/supi-lsp/src/session/workspace-lsp-runtime.ts +22 -1
- package/node_modules/@mrclrchtr/supi-tree-sitter/README.md +1 -1
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-code-runtime/package.json +1 -1
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-code-runtime/src/api.ts +3 -1
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-code-runtime/src/declaration-level.ts +34 -0
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-code-runtime/src/types.ts +64 -28
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-core/package.json +1 -1
- package/node_modules/@mrclrchtr/supi-tree-sitter/package.json +3 -3
- package/node_modules/@mrclrchtr/supi-tree-sitter/resources/grammars/tsx/tree-sitter-tsx.wasm +0 -0
- package/node_modules/@mrclrchtr/supi-tree-sitter/resources/grammars/tsx/tree-sitter-tsx.wasm.json +5 -1
- package/node_modules/@mrclrchtr/supi-tree-sitter/resources/grammars/typescript/tree-sitter-typescript.wasm +0 -0
- package/node_modules/@mrclrchtr/supi-tree-sitter/resources/grammars/typescript/tree-sitter-typescript.wasm.json +5 -1
- package/node_modules/@mrclrchtr/supi-tree-sitter/src/coordinates.ts +16 -2
- package/node_modules/@mrclrchtr/supi-tree-sitter/src/session/structural-worker-client.ts +3 -2
- package/node_modules/@mrclrchtr/supi-tree-sitter/src/syntax-errors.ts +2 -0
- package/node_modules/@mrclrchtr/supi-tree-sitter/src/tool/call-range.ts +94 -0
- package/node_modules/@mrclrchtr/supi-tree-sitter/src/tool/call-sites.ts +26 -6
- package/node_modules/@mrclrchtr/supi-tree-sitter/src/tool/callees.ts +6 -3
- package/node_modules/@mrclrchtr/supi-tree-sitter/src/tool/exports.ts +13 -4
- package/node_modules/@mrclrchtr/supi-tree-sitter/src/worker/runtime.ts +1 -9
- package/package.json +5 -5
- package/src/analysis/health/server-status.ts +41 -12
- package/src/analysis/helpers.ts +0 -7
- package/src/analysis/relations/implementations.ts +5 -0
- package/src/analysis/relations/references.ts +5 -0
- package/src/analysis/target/anchored-structural.ts +4 -1
- package/src/analysis/target/file-merge.ts +162 -0
- package/src/analysis/target/file-outline-omissions.ts +146 -0
- package/src/analysis/target/file-refinement.ts +7 -7
- package/src/analysis/target/file.ts +44 -156
- package/src/analysis/target/symbol.ts +5 -1
- package/src/analysis/target/types.ts +32 -6
- package/src/api.ts +1 -1
- package/src/app/app.ts +9 -3
- package/src/session/find-types.ts +8 -4
- package/src/session/find-workflow.ts +11 -16
- package/src/session/graph/collect.ts +2 -0
- package/src/session/graph-types.ts +3 -1
- package/src/session/graph-workflow.ts +5 -4
- package/src/session/input/health-refactor.ts +48 -34
- package/src/session/input/workflows.ts +45 -46
- package/src/session/inspect/file-point.ts +2 -2
- package/src/session/inspect-types.ts +1 -1
- package/src/session/inspect-workflow.ts +3 -3
- package/src/session/orientation/workspace-context.ts +3 -0
- package/src/session/orientation-workflow.ts +6 -3
- package/src/session/refactor-file-actions.ts +122 -0
- package/src/session/refactor-plan-pipeline.ts +152 -0
- package/src/session/refactor-plans.ts +18 -15
- package/src/session/refactor-types.ts +24 -12
- package/src/session/refactor-workflow.ts +70 -244
- package/src/session/session.ts +87 -12
- package/src/session/target-workflow.ts +23 -21
- package/src/tool/code_find/execute.ts +6 -7
- package/src/tool/code_find/spec.ts +9 -16
- package/src/tool/code_find/tui.ts +12 -6
- package/src/tool/code_graph/section.ts +4 -0
- package/src/tool/code_graph/spec.ts +6 -0
- package/src/tool/code_health/spec.ts +6 -0
- package/src/tool/code_health/structured-schema.ts +4 -4
- package/src/tool/code_health/structured.ts +15 -17
- package/src/tool/code_inspect/execute.ts +1 -1
- package/src/tool/code_inspect/markdown.ts +33 -6
- package/src/tool/code_inspect/result.ts +1 -1
- package/src/tool/code_inspect/spec.ts +14 -6
- package/src/tool/code_inspect/structured.ts +2 -2
- package/src/tool/code_inspect/tui.ts +2 -2
- package/src/tool/code_orientation/directory-navigation.ts +20 -31
- package/src/tool/code_orientation/spec.ts +8 -0
- package/src/tool/code_orientation/workspace-output.ts +40 -13
- package/src/tool/code_orientation/workspace-sections.ts +45 -2
- package/src/tool/code_refactor_apply/result.ts +2 -1
- package/src/tool/code_refactor_apply/spec.ts +7 -0
- package/src/tool/code_refactor_plan/execute.ts +0 -2
- package/src/tool/code_refactor_plan/result.ts +23 -13
- package/src/tool/code_refactor_plan/spec.ts +8 -2
- package/src/tool/code_refactor_plan/structured.ts +59 -12
- package/src/tool/code_refactor_plan/tui.ts +14 -17
- package/src/tool/code_resolve/guidance.ts +1 -1
- package/src/tool/code_resolve/markdown.ts +121 -34
- package/src/tool/code_resolve/result.ts +18 -15
- package/src/tool/code_resolve/spec.ts +6 -0
- package/src/tool/code_resolve/structured.ts +43 -10
- package/src/tool/namespace.ts +14 -0
- package/src/tool/refactor-markdown.ts +55 -15
- package/src/tool/register.ts +3 -0
- package/src/tool/result/model-budget.ts +2 -2
- package/src/tool/result/refactor-preview.ts +118 -0
- package/src/tool/result/refactor-unavailable.ts +16 -0
- package/src/tool/result/refactor.ts +8 -2
- package/src/tool/result/types.ts +13 -10
- package/src/tool/schemas.ts +63 -20
- package/src/tool/specs.ts +3 -0
- package/src/ui/status-overlay.ts +1 -1
- package/src/ui/tui/common.ts +10 -10
|
@@ -5,6 +5,7 @@ import { toDisplayPath } from "../../analysis/search/paths.ts";
|
|
|
5
5
|
import type { RefactorPlan } from "../../session/refactor-plans.ts";
|
|
6
6
|
import { assembledNextQueries, assembleToolResult, type ToolResultAssembly } from "./assembly.ts";
|
|
7
7
|
import { createToolDisplaySection } from "./display.ts";
|
|
8
|
+
import { previewEditCount } from "./refactor-preview.ts";
|
|
8
9
|
import type { SearchDetails, ToolDisplaySection } from "./types.ts";
|
|
9
10
|
|
|
10
11
|
export interface RefactorPlanAssemblyData {
|
|
@@ -45,7 +46,7 @@ export function assembleRefactorPlanDetails(
|
|
|
45
46
|
const edits = createEvidenceList({
|
|
46
47
|
key: "refactor.edits",
|
|
47
48
|
items: [...plan.edits.edits],
|
|
48
|
-
maxResults,
|
|
49
|
+
maxResults: previewEditCount(plan.edits.edits, maxResults),
|
|
49
50
|
});
|
|
50
51
|
const evidenceSource = plan.evidenceSource ?? "semantic";
|
|
51
52
|
const provenance = [
|
|
@@ -67,7 +68,12 @@ export function assembleRefactorPlanDetails(
|
|
|
67
68
|
},
|
|
68
69
|
],
|
|
69
70
|
evidenceLists: [edits.metadata],
|
|
70
|
-
nextQueries: [
|
|
71
|
+
nextQueries: [
|
|
72
|
+
`Use code_refactor_apply with planId: "${plan.id}" to apply this refactor`,
|
|
73
|
+
...(plan.operation === "code_action"
|
|
74
|
+
? ["After applying, use rename_symbol to rename any server-generated names"]
|
|
75
|
+
: []),
|
|
76
|
+
],
|
|
71
77
|
candidateCount: edits.metadata.totalCount ?? edits.metadata.shownCount,
|
|
72
78
|
confidence: evidenceSource,
|
|
73
79
|
provenance,
|
package/src/tool/result/types.ts
CHANGED
|
@@ -9,6 +9,7 @@ import type {
|
|
|
9
9
|
StructuredMatch,
|
|
10
10
|
StructuredScanSummary,
|
|
11
11
|
} from "../../analysis/search/pattern.ts";
|
|
12
|
+
import type { FileOutlineNotListed } from "../../analysis/target/types.ts";
|
|
12
13
|
import type {
|
|
13
14
|
HealthDiagnosticObservation,
|
|
14
15
|
HealthRefreshState,
|
|
@@ -123,20 +124,22 @@ export type { DisambiguationCandidateData as DisambiguationCandidate } from "../
|
|
|
123
124
|
export interface ResolveDetails {
|
|
124
125
|
resultKind:
|
|
125
126
|
| "resolved"
|
|
126
|
-
| "
|
|
127
|
+
| "file-outline"
|
|
127
128
|
| "disambiguation"
|
|
128
129
|
| "kind-mismatch"
|
|
129
130
|
| "invalid-input"
|
|
130
131
|
| "unavailable";
|
|
131
|
-
/** Workspace-relative source file
|
|
132
|
-
|
|
133
|
-
/** Providers that successfully enumerated
|
|
134
|
-
|
|
135
|
-
/**
|
|
136
|
-
|
|
137
|
-
/** Provider recovery that makes this
|
|
138
|
-
|
|
139
|
-
|
|
132
|
+
/** Workspace-relative source file of a File outline. */
|
|
133
|
+
outlineFile?: string;
|
|
134
|
+
/** Providers that successfully enumerated the File outline's file. */
|
|
135
|
+
outlineDiscoveryProvenance?: readonly TargetProviderProvenance[];
|
|
136
|
+
/** Outline declarations whose provider reported no enclosing declaration. */
|
|
137
|
+
outlineUnknownLevelCount?: number;
|
|
138
|
+
/** Provider recovery that makes this File outline incomplete. */
|
|
139
|
+
outlinePartialReason?: string | null;
|
|
140
|
+
outlineErrorRanges?: readonly SourceRange[];
|
|
141
|
+
/** Discovered declarations left out of the File outline, with exact counts. */
|
|
142
|
+
outlineNotListed?: FileOutlineNotListed;
|
|
140
143
|
/** Strict provider kind that produced a near-match result. */
|
|
141
144
|
requestedKind?: TargetSymbolKind;
|
|
142
145
|
confidence: ConfidenceMode;
|
package/src/tool/schemas.ts
CHANGED
|
@@ -4,11 +4,12 @@ import {
|
|
|
4
4
|
type PublicRefactorOperationName,
|
|
5
5
|
} from "../session/refactor-types.ts";
|
|
6
6
|
import { TARGET_SYMBOL_KINDS } from "../session/target-input.ts";
|
|
7
|
+
import { CODE_FIND_AST_KINDS } from "./code_find/ast-kinds.ts";
|
|
7
8
|
|
|
8
9
|
export const ScopeParam = Type.String({
|
|
9
10
|
description: "Workspace-relative file or directory scope.",
|
|
10
11
|
});
|
|
11
|
-
export const
|
|
12
|
+
export const FindScopesParam = Type.Array(
|
|
12
13
|
Type.String({ description: "Workspace-relative search scope." }),
|
|
13
14
|
{
|
|
14
15
|
description: "One or more workspace-relative search scopes.",
|
|
@@ -20,11 +21,6 @@ export const QueryParam = Type.String({
|
|
|
20
21
|
description: "Human or code reference to resolve or search for.",
|
|
21
22
|
minLength: 1,
|
|
22
23
|
});
|
|
23
|
-
export const FindQueryParam = Type.String({
|
|
24
|
-
description:
|
|
25
|
-
"AST mode: name or import module-specifier substring. Semantic mode: workspace-symbol query.",
|
|
26
|
-
minLength: 1,
|
|
27
|
-
});
|
|
28
24
|
const LineParam = Type.Integer({ description: "1-based line.", minimum: 1 });
|
|
29
25
|
const CharacterParam = Type.Integer({
|
|
30
26
|
description: "1-based UTF-16 column.",
|
|
@@ -74,6 +70,29 @@ function exactOneSelector(properties: Record<string, TSchema>, description: stri
|
|
|
74
70
|
});
|
|
75
71
|
}
|
|
76
72
|
|
|
73
|
+
export const FindSearchParam = exactOneSelector(
|
|
74
|
+
{
|
|
75
|
+
ast: Type.Object(
|
|
76
|
+
{
|
|
77
|
+
kind: Type.Enum(CODE_FIND_AST_KINDS, {
|
|
78
|
+
type: "string",
|
|
79
|
+
description: "AST structure kind.",
|
|
80
|
+
}),
|
|
81
|
+
query: Type.String({
|
|
82
|
+
description: "Name or import module-specifier substring.",
|
|
83
|
+
minLength: 1,
|
|
84
|
+
}),
|
|
85
|
+
},
|
|
86
|
+
{ additionalProperties: false, description: "Structural search over syntax trees." },
|
|
87
|
+
),
|
|
88
|
+
semantic: Type.Object(
|
|
89
|
+
{ query: Type.String({ description: "Workspace-symbol query.", minLength: 1 }) },
|
|
90
|
+
{ additionalProperties: false, description: "Language-server workspace-symbol search." },
|
|
91
|
+
),
|
|
92
|
+
},
|
|
93
|
+
"Exactly one search mode.",
|
|
94
|
+
);
|
|
95
|
+
|
|
77
96
|
export const ResolveTargetParam = exactOneSelector(
|
|
78
97
|
{
|
|
79
98
|
anchor: SourcePointParam,
|
|
@@ -112,7 +131,7 @@ export const OrientationFocusParam = exactOneSelector(
|
|
|
112
131
|
"Exactly one Orientation focus.",
|
|
113
132
|
);
|
|
114
133
|
|
|
115
|
-
|
|
134
|
+
const RefactorTargetParam = exactOneSelector(
|
|
116
135
|
{
|
|
117
136
|
handle: Type.String({ description: "Target handle from a previous code tool result." }),
|
|
118
137
|
anchor: SourcePointParam,
|
|
@@ -131,28 +150,52 @@ const RangeParam = Type.Object(
|
|
|
131
150
|
{ additionalProperties: false },
|
|
132
151
|
),
|
|
133
152
|
},
|
|
134
|
-
{
|
|
153
|
+
{
|
|
154
|
+
additionalProperties: false,
|
|
155
|
+
description: "Source range; end is exclusive. Equal start and end mark a cursor position.",
|
|
156
|
+
},
|
|
135
157
|
);
|
|
136
158
|
|
|
137
159
|
const NewNameParam = Type.String({ description: "New symbol name.", minLength: 1 });
|
|
160
|
+
const ActionTitleParam = Type.String({
|
|
161
|
+
description:
|
|
162
|
+
"Exact action title from a previous ambiguous result; selects one of several matching actions.",
|
|
163
|
+
minLength: 1,
|
|
164
|
+
});
|
|
138
165
|
|
|
139
166
|
const RefactorOperationProperties = {
|
|
140
|
-
rename_symbol: Type.Object(
|
|
141
|
-
|
|
142
|
-
{
|
|
143
|
-
{ additionalProperties: false },
|
|
144
|
-
),
|
|
145
|
-
extract_variable: Type.Object(
|
|
146
|
-
{ newName: NewNameParam, range: RangeParam },
|
|
147
|
-
{ additionalProperties: false },
|
|
167
|
+
rename_symbol: Type.Object(
|
|
168
|
+
{ target: RefactorTargetParam, newName: NewNameParam },
|
|
169
|
+
{ additionalProperties: false, description: "Rename one symbol across the workspace." },
|
|
148
170
|
),
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
171
|
+
code_action: Type.Object(
|
|
172
|
+
{
|
|
173
|
+
file: FileParam,
|
|
174
|
+
range: RangeParam,
|
|
175
|
+
kind: Type.String({
|
|
176
|
+
description:
|
|
177
|
+
'CodeActionKind prefix under "refactor", such as "refactor.extract" or "refactor.inline". Sub-kinds match.',
|
|
178
|
+
pattern: "^refactor(\\..+)?$",
|
|
179
|
+
}),
|
|
180
|
+
title: Type.Optional(ActionTitleParam),
|
|
181
|
+
},
|
|
152
182
|
{
|
|
153
183
|
additionalProperties: false,
|
|
154
|
-
description:
|
|
184
|
+
description:
|
|
185
|
+
"Server refactor action for one range. Generated names (e.g. extracted variables) appear in the preview; rename them afterwards with rename_symbol.",
|
|
186
|
+
},
|
|
187
|
+
),
|
|
188
|
+
source_action: Type.Object(
|
|
189
|
+
{
|
|
190
|
+
file: FileParam,
|
|
191
|
+
kind: Type.String({
|
|
192
|
+
description:
|
|
193
|
+
'CodeActionKind prefix under "source", such as "source.organizeImports" or "source.fixAll". Sub-kinds match.',
|
|
194
|
+
pattern: "^source(\\..+)?$",
|
|
195
|
+
}),
|
|
196
|
+
title: Type.Optional(ActionTitleParam),
|
|
155
197
|
},
|
|
198
|
+
{ additionalProperties: false, description: "Server source action for one whole file." },
|
|
156
199
|
),
|
|
157
200
|
} satisfies Record<PublicRefactorOperationName, TSchema>;
|
|
158
201
|
|
package/src/tool/specs.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { ToolAnnotations } from "@earendil-works/pi-coding-agent";
|
|
1
2
|
import type { Component } from "@earendil-works/pi-tui";
|
|
2
3
|
import type { TSchema } from "typebox";
|
|
3
4
|
import type {
|
|
@@ -27,6 +28,8 @@ export type CodeToolRendererFn = (...args: any[]) => Component;
|
|
|
27
28
|
export interface CodeIntelligenceToolDefinitionSpec {
|
|
28
29
|
name: CodeIntelligenceToolName;
|
|
29
30
|
label: string;
|
|
31
|
+
/** Audited behavior hints for permission extensions (MCP tool-annotation semantics). */
|
|
32
|
+
annotations: ToolAnnotations;
|
|
30
33
|
parameters: TSchema;
|
|
31
34
|
/** Machine-readable success and recoverable-input outcomes for programmatic callers. */
|
|
32
35
|
outputSchema?: TSchema;
|
package/src/ui/status-overlay.ts
CHANGED
|
@@ -618,7 +618,7 @@ export class CiStatusDialog {
|
|
|
618
618
|
text(
|
|
619
619
|
t.fg(
|
|
620
620
|
"dim",
|
|
621
|
-
` ${operation}: server ${support.server}; SuPi ${support.supi}${support.reason ? ` — ${support.reason}` : ""}`,
|
|
621
|
+
` ${operation}: server ${support.server}; SuPi ${support.supi}${support.kinds?.length ? `; kinds ${support.kinds.join(", ")}` : ""}${support.anyKind ? "; may return any kind" : ""}${support.reason ? ` — ${support.reason}` : ""}`,
|
|
622
622
|
),
|
|
623
623
|
);
|
|
624
624
|
}
|
package/src/ui/tui/common.ts
CHANGED
|
@@ -310,13 +310,13 @@ export function buildSimpleCompact(data: Record<string, unknown> | undefined, th
|
|
|
310
310
|
const confidence = typeof data.confidence === "string" ? data.confidence : "";
|
|
311
311
|
const dot = theme.fg("dim", "·");
|
|
312
312
|
const segments = badges.map((badge) => theme.fg("success", theme.bold(badge)));
|
|
313
|
-
const
|
|
313
|
+
const unknownLevelCount = data.outlineUnknownLevelCount;
|
|
314
314
|
if (
|
|
315
|
-
typeof
|
|
316
|
-
Number.isInteger(
|
|
317
|
-
|
|
315
|
+
typeof unknownLevelCount === "number" &&
|
|
316
|
+
Number.isInteger(unknownLevelCount) &&
|
|
317
|
+
unknownLevelCount > 0
|
|
318
318
|
) {
|
|
319
|
-
segments.push(theme.fg("warning", `${
|
|
319
|
+
segments.push(theme.fg("warning", `${unknownLevelCount} position unknown`));
|
|
320
320
|
}
|
|
321
321
|
if (confidence) {
|
|
322
322
|
segments.push(`${theme.fg("dim", "confidence")} ${theme.fg("muted", confidence)}`);
|
|
@@ -349,13 +349,13 @@ function structuredDetailLines(data: Record<string, unknown>): string[] {
|
|
|
349
349
|
|
|
350
350
|
lines.push(...inspectSectionStatusLines(data.sections));
|
|
351
351
|
|
|
352
|
-
const
|
|
352
|
+
const unknownLevelCount = data.outlineUnknownLevelCount;
|
|
353
353
|
if (
|
|
354
|
-
typeof
|
|
355
|
-
Number.isInteger(
|
|
356
|
-
|
|
354
|
+
typeof unknownLevelCount === "number" &&
|
|
355
|
+
Number.isInteger(unknownLevelCount) &&
|
|
356
|
+
unknownLevelCount > 0
|
|
357
357
|
) {
|
|
358
|
-
lines.push(`
|
|
358
|
+
lines.push(`position unknown: ${unknownLevelCount}`);
|
|
359
359
|
}
|
|
360
360
|
|
|
361
361
|
const checkNext = data.checkNext;
|