@oh-my-pi/pi-coding-agent 17.2.10 → 17.2.12
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 +53 -0
- package/dist/{CHANGELOG-rhwzpexa.md → CHANGELOG-k9ghy5sn.md} +53 -0
- package/dist/cli.js +10775 -10762
- package/dist/types/advisor/runtime.d.ts +1 -1
- package/dist/types/capability/mcp.d.ts +11 -0
- package/dist/types/capability/skill.d.ts +6 -0
- package/dist/types/cli/command-help.d.ts +3 -0
- package/dist/types/commands/share.d.ts +25 -0
- package/dist/types/commit/agentic/index.d.ts +3 -1
- package/dist/types/commit/execute.d.ts +32 -0
- package/dist/types/commit/index.d.ts +2 -1
- package/dist/types/commit/pipeline.d.ts +7 -1
- package/dist/types/config/custom-models.d.ts +31 -0
- package/dist/types/config/model-config-values.d.ts +19 -0
- package/dist/types/config/model-patch.d.ts +93 -0
- package/dist/types/config/model-provider-discovery.d.ts +51 -0
- package/dist/types/config/model-registry.d.ts +9 -52
- package/dist/types/config/settings-schema.d.ts +1 -34
- package/dist/types/config/settings.d.ts +5 -3
- package/dist/types/debug/raw-sse-buffer.d.ts +9 -0
- package/dist/types/discovery/agent-plugin-format.d.ts +136 -0
- package/dist/types/discovery/agent-plugins.d.ts +1 -0
- package/dist/types/discovery/contained-path.d.ts +33 -0
- package/dist/types/discovery/index.d.ts +1 -0
- package/dist/types/eval/executor-base.d.ts +8 -2
- package/dist/types/eval/kernel-session-registry.d.ts +60 -0
- package/dist/types/export/share.d.ts +1 -1
- package/dist/types/extensibility/custom-tools/types.d.ts +2 -2
- package/dist/types/extensibility/extensions/loader.d.ts +7 -0
- package/dist/types/extensibility/extensions/types.d.ts +11 -0
- package/dist/types/extensibility/shared-events.d.ts +3 -2
- package/dist/types/extensibility/skills.d.ts +5 -0
- package/dist/types/lsp/diagnostics.d.ts +96 -0
- package/dist/types/lsp/index.d.ts +7 -128
- package/dist/types/lsp/servers.d.ts +72 -0
- package/dist/types/lsp/tool.d.ts +42 -0
- package/dist/types/lsp/workspace-diagnostics.d.ts +12 -0
- package/dist/types/lsp/writethrough.d.ts +33 -0
- package/dist/types/mcp/transports/header-policy.d.ts +46 -0
- package/dist/types/mcp/types.d.ts +15 -0
- package/dist/types/modes/components/agent-hub-projection.d.ts +2 -7
- package/dist/types/modes/components/agent-hub-renderer.d.ts +0 -7
- package/dist/types/modes/components/agent-hub.d.ts +2 -0
- package/dist/types/modes/components/agent-transcript-viewer.d.ts +2 -0
- package/dist/types/modes/components/chat-transcript-builder.d.ts +2 -0
- package/dist/types/modes/components/custom-editor.d.ts +1 -2
- package/dist/types/modes/components/status-line/types.d.ts +2 -0
- package/dist/types/modes/components/tool-execution.d.ts +2 -0
- package/dist/types/modes/theme/color.d.ts +19 -0
- package/dist/types/modes/theme/loader.d.ts +19 -0
- package/dist/types/modes/theme/schema.d.ts +175 -0
- package/dist/types/modes/theme/symbols.d.ts +28 -0
- package/dist/types/modes/theme/theme-class.d.ts +244 -0
- package/dist/types/modes/theme/theme.d.ts +9 -280
- package/dist/types/modes/theme/tui-adapters.d.ts +13 -0
- package/dist/types/modes/utils/transcript-render-helpers.d.ts +3 -2
- package/dist/types/registry/agent-registry.d.ts +1 -3
- package/dist/types/secrets/index.d.ts +26 -2
- package/dist/types/secrets/message-transform.d.ts +40 -0
- package/dist/types/secrets/obfuscator.d.ts +0 -108
- package/dist/types/secrets/placeholder-scan.d.ts +95 -0
- package/dist/types/secrets/placeholder.d.ts +94 -0
- package/dist/types/secrets/replacement.d.ts +82 -0
- package/dist/types/session/agent-session-events.d.ts +2 -2
- package/dist/types/session/agent-session-types.d.ts +6 -0
- package/dist/types/session/agent-session.d.ts +2 -2
- package/dist/types/session/messages.d.ts +1 -0
- package/dist/types/session/prewalk.d.ts +3 -1
- package/dist/types/session/session-handoff.d.ts +3 -3
- package/dist/types/session/session-manager.d.ts +32 -0
- package/dist/types/session/session-provider-boundary.d.ts +1 -1
- package/dist/types/session/session-tools.d.ts +8 -0
- package/dist/types/session/turn-recovery.d.ts +9 -4
- package/dist/types/slash-commands/builtin-collaboration.d.ts +2 -0
- package/dist/types/slash-commands/builtin-completions.d.ts +36 -0
- package/dist/types/slash-commands/builtin-control.d.ts +2 -0
- package/dist/types/slash-commands/builtin-lifecycle.d.ts +3 -0
- package/dist/types/slash-commands/builtin-marketplace.d.ts +11 -0
- package/dist/types/slash-commands/builtin-modes.d.ts +5 -0
- package/dist/types/slash-commands/builtin-registry.d.ts +1 -1
- package/dist/types/slash-commands/builtin-session.d.ts +2 -0
- package/dist/types/task/index.d.ts +2 -0
- package/dist/types/tools/gh-common.d.ts +69 -0
- package/dist/types/tools/gh-pr-checkout.d.ts +84 -0
- package/dist/types/tools/gh-pr-diff.d.ts +102 -0
- package/dist/types/tools/gh-run-watch.d.ts +78 -0
- package/dist/types/tools/gh-search.d.ts +61 -0
- package/dist/types/tools/gh-types.d.ts +340 -0
- package/dist/types/tools/gh-view.d.ts +88 -0
- package/dist/types/tools/gh.d.ts +4 -201
- package/dist/types/tools/read-archive.d.ts +16 -0
- package/dist/types/tools/read-format.d.ts +104 -0
- package/dist/types/tools/read-path-resolution.d.ts +19 -0
- package/dist/types/tools/read-pdf-images.d.ts +12 -0
- package/dist/types/tools/read-renderer.d.ts +24 -0
- package/dist/types/tools/read-selector.d.ts +27 -0
- package/dist/types/tools/read-sqlite.d.ts +16 -0
- package/dist/types/tools/read-summary.d.ts +19 -0
- package/dist/types/tools/read.d.ts +1 -23
- package/dist/types/tools/shell-tokenize.d.ts +18 -1
- package/dist/types/utils/changelog.d.ts +0 -5
- package/package.json +13 -13
- package/scripts/legacy-pi-virtual-module.ts +4 -1
- package/src/advisor/runtime.ts +12 -7
- package/src/capability/mcp.ts +11 -0
- package/src/capability/skill.ts +6 -0
- package/src/cli/command-help.ts +4 -0
- package/src/cli/gallery-cli.ts +1 -1
- package/src/cli-commands.ts +5 -0
- package/src/commands/commit.ts +16 -3
- package/src/commands/share.ts +71 -0
- package/src/commit/agentic/index.ts +39 -21
- package/src/commit/execute.ts +56 -0
- package/src/commit/index.ts +2 -1
- package/src/commit/pipeline.ts +20 -7
- package/src/config/custom-models.ts +188 -0
- package/src/config/model-config-values.ts +128 -0
- package/src/config/model-discovery.ts +1 -1
- package/src/config/model-patch.ts +252 -0
- package/src/config/model-provider-discovery.ts +132 -0
- package/src/config/model-registry.ts +84 -704
- package/src/config/settings-schema.ts +2 -33
- package/src/config/settings.ts +53 -3
- package/src/debug/raw-sse-buffer.ts +20 -0
- package/src/discovery/agent-plugin-format.ts +551 -0
- package/src/discovery/agent-plugins.ts +341 -0
- package/src/discovery/claude-plugins.ts +21 -5
- package/src/discovery/contained-path.ts +75 -0
- package/src/discovery/helpers.ts +23 -9
- package/src/discovery/index.ts +1 -0
- package/src/discovery/omp-plugins.ts +20 -7
- package/src/edit/hashline/diff.ts +5 -1
- package/src/eval/executor-base.ts +39 -6
- package/src/eval/jl/executor.ts +82 -371
- package/src/eval/kernel-session-registry.ts +398 -0
- package/src/eval/py/executor.ts +53 -261
- package/src/eval/rb/executor.ts +36 -279
- package/src/exec/non-interactive-env.ts +1 -0
- package/src/export/share.ts +2 -1
- package/src/extensibility/custom-tools/types.ts +2 -2
- package/src/extensibility/extensions/loader.ts +78 -14
- package/src/extensibility/extensions/runner.ts +6 -0
- package/src/extensibility/extensions/types.ts +12 -0
- package/src/extensibility/plugins/marketplace/manager.ts +2 -1
- package/src/extensibility/shared-events.ts +3 -2
- package/src/extensibility/skills.ts +9 -0
- package/src/internal-urls/skill-protocol.ts +14 -0
- package/src/internal-urls/vault-protocol.ts +2 -2
- package/src/launch/client.ts +11 -1
- package/src/launch/protocol.ts +7 -2
- package/src/lsp/diagnostics.ts +516 -0
- package/src/lsp/index.ts +20 -2819
- package/src/lsp/servers.ts +296 -0
- package/src/lsp/tool.ts +1352 -0
- package/src/lsp/workspace-diagnostics.ts +170 -0
- package/src/lsp/writethrough.ts +561 -0
- package/src/main.ts +3 -2
- package/src/mcp/config.ts +3 -0
- package/src/mcp/manager.ts +12 -9
- package/src/mcp/transports/header-policy.ts +95 -0
- package/src/mcp/transports/http.ts +35 -52
- package/src/mcp/transports/sse.ts +20 -27
- package/src/mcp/types.ts +15 -0
- package/src/modes/acp/acp-agent.ts +15 -4
- package/src/modes/components/agent-dashboard.ts +2 -0
- package/src/modes/components/agent-hub-projection.ts +2 -2
- package/src/modes/components/agent-hub-renderer.ts +3 -7
- package/src/modes/components/agent-hub.ts +5 -0
- package/src/modes/components/agent-transcript-viewer.ts +3 -0
- package/src/modes/components/chat-transcript-builder.ts +3 -0
- package/src/modes/components/custom-editor.ts +0 -9
- package/src/modes/components/status-line/component.ts +1 -0
- package/src/modes/components/status-line/segments.ts +6 -4
- package/src/modes/components/status-line/types.ts +2 -0
- package/src/modes/components/tool-execution.ts +13 -16
- package/src/modes/components/tree-selector.ts +62 -3
- package/src/modes/controllers/command-controller.ts +8 -2
- package/src/modes/controllers/event-controller.ts +15 -15
- package/src/modes/controllers/input-controller.ts +20 -2
- package/src/modes/controllers/selector-controller.ts +1 -0
- package/src/modes/theme/color.ts +133 -0
- package/src/modes/theme/loader.ts +178 -0
- package/src/modes/theme/schema.ts +263 -0
- package/src/modes/theme/symbols.ts +1000 -0
- package/src/modes/theme/theme-class.ts +611 -0
- package/src/modes/theme/theme.ts +27 -2453
- package/src/modes/theme/tui-adapters.ts +279 -0
- package/src/modes/utils/transcript-render-helpers.ts +4 -2
- package/src/modes/utils/ui-helpers.ts +1 -0
- package/src/registry/agent-registry.ts +2 -2
- package/src/sdk.ts +6 -49
- package/src/secrets/index.ts +51 -6
- package/src/secrets/message-transform.ts +287 -0
- package/src/secrets/obfuscator.ts +39 -1303
- package/src/secrets/placeholder-scan.ts +506 -0
- package/src/secrets/placeholder.ts +309 -0
- package/src/secrets/replacement.ts +216 -0
- package/src/session/agent-session-events.ts +2 -2
- package/src/session/agent-session-types.ts +6 -0
- package/src/session/agent-session.ts +146 -21
- package/src/session/indexed-session-storage.ts +7 -2
- package/src/session/messages.ts +1 -0
- package/src/session/prewalk.ts +57 -17
- package/src/session/session-advisors.ts +32 -34
- package/src/session/session-context.ts +3 -5
- package/src/session/session-handoff.ts +39 -16
- package/src/session/session-manager.ts +67 -3
- package/src/session/session-provider-boundary.ts +3 -6
- package/src/session/session-tools.ts +37 -3
- package/src/session/todo-tracker.ts +11 -1
- package/src/session/turn-recovery.ts +115 -84
- package/src/slash-commands/builtin-collaboration.ts +504 -0
- package/src/slash-commands/builtin-completions.ts +291 -0
- package/src/slash-commands/builtin-control.ts +78 -0
- package/src/slash-commands/builtin-lifecycle.ts +506 -0
- package/src/slash-commands/builtin-marketplace.ts +567 -0
- package/src/slash-commands/builtin-modes.ts +518 -0
- package/src/slash-commands/builtin-registry.ts +21 -2996
- package/src/slash-commands/builtin-session.ts +592 -0
- package/src/task/executor.ts +17 -14
- package/src/task/index.ts +21 -6
- package/src/tools/bash-skill-urls.ts +15 -0
- package/src/tools/bash.ts +10 -11
- package/src/tools/debug.ts +1 -1
- package/src/tools/gh-common.ts +288 -0
- package/src/tools/gh-pr-checkout.ts +679 -0
- package/src/tools/gh-pr-diff.ts +473 -0
- package/src/tools/gh-run-watch.ts +1015 -0
- package/src/tools/gh-search.ts +500 -0
- package/src/tools/gh-types.ts +379 -0
- package/src/tools/gh-view.ts +612 -0
- package/src/tools/gh.ts +109 -3821
- package/src/tools/jtd-to-json-schema.ts +123 -21
- package/src/tools/read-archive.ts +209 -0
- package/src/tools/read-format.ts +593 -0
- package/src/tools/read-path-resolution.ts +36 -0
- package/src/tools/read-pdf-images.ts +250 -0
- package/src/tools/read-renderer.ts +289 -0
- package/src/tools/read-selector.ts +84 -0
- package/src/tools/read-sqlite.ts +215 -0
- package/src/tools/read-summary.ts +199 -0
- package/src/tools/read.ts +82 -1824
- package/src/tools/shell-tokenize.ts +99 -1
- package/src/utils/changelog.ts +1 -1
- package/src/utils/title-generator.ts +3 -1
- package/src/web/search/providers/exa.ts +1 -1
- package/src/web/search/providers/zai.ts +12 -3
|
@@ -87,7 +87,7 @@ export function tokenizeShellSegments(command: string): string[][] {
|
|
|
87
87
|
*
|
|
88
88
|
* @see extractFlatShellCommandSegments
|
|
89
89
|
*/
|
|
90
|
-
|
|
90
|
+
interface FlatShellCommandSegment {
|
|
91
91
|
/** Original segment text with quoting and escaping preserved. */
|
|
92
92
|
text: string;
|
|
93
93
|
/**
|
|
@@ -211,3 +211,101 @@ export function extractFlatShellCommandSegments(command: string): FlatShellComma
|
|
|
211
211
|
pushSegment(command.length);
|
|
212
212
|
return segments;
|
|
213
213
|
}
|
|
214
|
+
|
|
215
|
+
/**
|
|
216
|
+
* Shell metacharacters that end an unquoted `cd` target token. A redirect,
|
|
217
|
+
* extra argument, or any operator in this set means the leading construct is
|
|
218
|
+
* more than a bare `cd <path>`, so extraction must bail.
|
|
219
|
+
*/
|
|
220
|
+
const CD_TARGET_TERMINATORS: Record<string, true> = {
|
|
221
|
+
" ": true,
|
|
222
|
+
"\t": true,
|
|
223
|
+
"\n": true,
|
|
224
|
+
"\r": true,
|
|
225
|
+
"&": true,
|
|
226
|
+
"|": true,
|
|
227
|
+
";": true,
|
|
228
|
+
"<": true,
|
|
229
|
+
">": true,
|
|
230
|
+
"(": true,
|
|
231
|
+
")": true,
|
|
232
|
+
};
|
|
233
|
+
|
|
234
|
+
/**
|
|
235
|
+
* Parses a leading `cd <path> && ...` prefix so the bash tool can route the
|
|
236
|
+
* target through its structured `cwd` parameter when the model omits it.
|
|
237
|
+
*
|
|
238
|
+
* Returns the single path token (quotes and backslash escapes resolved to their
|
|
239
|
+
* literal value) and the command remainder after the top-level `&&`, or `null`
|
|
240
|
+
* when the command does not begin with exactly `cd`, one path token, and a
|
|
241
|
+
* top-level `&&`. The scanner deliberately bails on anything else in the prefix
|
|
242
|
+
* — redirects (`cd /tmp 2>/dev/null && ...`), extra arguments, or paths needing
|
|
243
|
+
* shell expansion (`$`, backticks, `(`) — leaving the whole command for the
|
|
244
|
+
* shell instead of absorbing shell syntax into `cwd`.
|
|
245
|
+
*/
|
|
246
|
+
export function extractLeadingCdTarget(command: string): { path: string; rest: string } | null {
|
|
247
|
+
const prefix = /^cd[ \t]+/.exec(command);
|
|
248
|
+
if (!prefix) return null;
|
|
249
|
+
let i = prefix[0].length;
|
|
250
|
+
let path = "";
|
|
251
|
+
let inSingle = false;
|
|
252
|
+
let inDouble = false;
|
|
253
|
+
for (; i < command.length; i++) {
|
|
254
|
+
const ch = command[i];
|
|
255
|
+
if (inSingle) {
|
|
256
|
+
if (ch === "'") {
|
|
257
|
+
inSingle = false;
|
|
258
|
+
continue;
|
|
259
|
+
}
|
|
260
|
+
path += ch;
|
|
261
|
+
continue;
|
|
262
|
+
}
|
|
263
|
+
if (inDouble) {
|
|
264
|
+
if (ch === "\\" && i + 1 < command.length) {
|
|
265
|
+
const next = command[i + 1];
|
|
266
|
+
// A line continuation crosses the first physical line. Leave it to
|
|
267
|
+
// the shell rather than turning the escaped newline into cwd text.
|
|
268
|
+
if (next === "\n" || next === "\r") return null;
|
|
269
|
+
if (next === '"' || next === "\\" || next === "$" || next === "`") {
|
|
270
|
+
path += next;
|
|
271
|
+
i++;
|
|
272
|
+
continue;
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
if (ch === '"') {
|
|
276
|
+
inDouble = false;
|
|
277
|
+
continue;
|
|
278
|
+
}
|
|
279
|
+
path += ch;
|
|
280
|
+
continue;
|
|
281
|
+
}
|
|
282
|
+
if (ch === "'") {
|
|
283
|
+
inSingle = true;
|
|
284
|
+
continue;
|
|
285
|
+
}
|
|
286
|
+
if (ch === '"') {
|
|
287
|
+
inDouble = true;
|
|
288
|
+
continue;
|
|
289
|
+
}
|
|
290
|
+
if (ch === "\\" && i + 1 < command.length) {
|
|
291
|
+
// Preserve shell line-continuation semantics by declining extraction.
|
|
292
|
+
if (command[i + 1] === "\n" || command[i + 1] === "\r") return null;
|
|
293
|
+
path += command[i + 1];
|
|
294
|
+
i++;
|
|
295
|
+
continue;
|
|
296
|
+
}
|
|
297
|
+
if (CD_TARGET_TERMINATORS[ch]) break;
|
|
298
|
+
path += ch;
|
|
299
|
+
}
|
|
300
|
+
// Unterminated quote or empty target: leave the command for the shell.
|
|
301
|
+
if (inSingle || inDouble || path.length === 0) return null;
|
|
302
|
+
// A path needing shell expansion can't be resolved literally through cwd.
|
|
303
|
+
if (/[$`(]/.test(path)) return null;
|
|
304
|
+
// Skip inter-token whitespace, then require a top-level `&&` (a single `&`,
|
|
305
|
+
// `||`, `;`, `|`, or a redirect all mean this is not a bare `cd <path>`).
|
|
306
|
+
while (command[i] === " " || command[i] === "\t") i++;
|
|
307
|
+
if (command[i] !== "&" || command[i + 1] !== "&") return null;
|
|
308
|
+
i += 2;
|
|
309
|
+
while (command[i] === " " || command[i] === "\t") i++;
|
|
310
|
+
return { path, rest: command.slice(i) };
|
|
311
|
+
}
|
package/src/utils/changelog.ts
CHANGED
|
@@ -201,7 +201,7 @@ function parseChangelogContent(content: string): ChangelogEntry[] {
|
|
|
201
201
|
* Compare changelog entries by their parsed version parts.
|
|
202
202
|
* Returns: -1 if v1 < v2, 0 if v1 === v2, 1 if v1 > v2
|
|
203
203
|
*/
|
|
204
|
-
|
|
204
|
+
function compareChangelogEntries(v1: ChangelogEntry, v2: ChangelogEntry): number {
|
|
205
205
|
if (v1.major !== v2.major) return v1.major - v2.major;
|
|
206
206
|
if (v1.minor !== v2.minor) return v1.minor - v2.minor;
|
|
207
207
|
return v1.patch - v2.patch;
|
|
@@ -6,6 +6,7 @@ import * as path from "node:path";
|
|
|
6
6
|
|
|
7
7
|
import { type Api, type AssistantMessage, completeSimple, type Model } from "@oh-my-pi/pi-ai";
|
|
8
8
|
import { StreamMarkupHealing } from "@oh-my-pi/pi-ai/utils/stream-markup-healing";
|
|
9
|
+
import { isConPTYHosted } from "@oh-my-pi/pi-tui";
|
|
9
10
|
import { isTerminalHeadless, logger, prompt } from "@oh-my-pi/pi-utils";
|
|
10
11
|
import type { ModelRegistry } from "../config/model-registry";
|
|
11
12
|
|
|
@@ -533,6 +534,7 @@ function emitTerminalTitle(): void {
|
|
|
533
534
|
terminalTitleRuntime.state,
|
|
534
535
|
terminalTitleRuntime.frame,
|
|
535
536
|
terminalTitleRuntime.enabled,
|
|
537
|
+
isConPTYHosted() ? "win32" : process.platform,
|
|
536
538
|
);
|
|
537
539
|
setTerminalTitle(next);
|
|
538
540
|
}
|
|
@@ -543,7 +545,7 @@ function stopTerminalTitleSpinner(): void {
|
|
|
543
545
|
}
|
|
544
546
|
|
|
545
547
|
function startTerminalTitleSpinner(): void {
|
|
546
|
-
if (
|
|
548
|
+
if (isConPTYHosted() || terminalTitleRuntime.timer || !process.stdout.isTTY) return;
|
|
547
549
|
terminalTitleRuntime.timer = setInterval(() => {
|
|
548
550
|
terminalTitleRuntime.frame = (terminalTitleRuntime.frame + 1) % TITLE_SPINNER_FRAMES.length;
|
|
549
551
|
emitTerminalTitle();
|
|
@@ -464,7 +464,7 @@ export class ExaProvider extends SearchProvider {
|
|
|
464
464
|
|
|
465
465
|
#settingsAllowSearch(): boolean {
|
|
466
466
|
try {
|
|
467
|
-
if (settings.get("exa.enabled") === false
|
|
467
|
+
if (settings.get("exa.enabled") === false) {
|
|
468
468
|
return false;
|
|
469
469
|
}
|
|
470
470
|
} catch {
|
|
@@ -353,11 +353,20 @@ function parseSearchPayload(rawResult: unknown): {
|
|
|
353
353
|
for (const part of content) {
|
|
354
354
|
const text = isRecord(part) ? asString(part.text) : null;
|
|
355
355
|
if (!text) continue;
|
|
356
|
-
textParts.push(text);
|
|
357
356
|
try {
|
|
358
|
-
|
|
357
|
+
let parsed: unknown = JSON.parse(text);
|
|
358
|
+
if (typeof parsed === "string") {
|
|
359
|
+
try {
|
|
360
|
+
parsed = JSON.parse(parsed);
|
|
361
|
+
} catch {
|
|
362
|
+
// The decoded string is answer text rather than another JSON payload.
|
|
363
|
+
}
|
|
364
|
+
}
|
|
365
|
+
candidates.push(parsed);
|
|
366
|
+
if (getSearchResults(parsed).length === 0) textParts.push(text);
|
|
359
367
|
} catch {
|
|
360
|
-
//
|
|
368
|
+
// Non-JSON content is preserved as answer text.
|
|
369
|
+
textParts.push(text);
|
|
361
370
|
}
|
|
362
371
|
}
|
|
363
372
|
}
|