@oh-my-pi/pi-coding-agent 15.11.1 → 15.11.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/CHANGELOG.md +27 -1
- package/dist/cli.js +629 -614
- package/dist/types/config/settings-schema.d.ts +36 -0
- package/dist/types/extensibility/custom-commands/types.d.ts +6 -3
- package/dist/types/extensibility/custom-tools/loader.d.ts +2 -1
- package/dist/types/extensibility/custom-tools/types.d.ts +8 -4
- package/dist/types/extensibility/extensions/types.d.ts +2 -2
- package/dist/types/extensibility/hooks/types.d.ts +8 -4
- package/dist/types/irc/bus.d.ts +15 -2
- package/dist/types/modes/components/plan-review-overlay.d.ts +2 -0
- package/dist/types/modes/rpc/rpc-client.d.ts +10 -1
- package/dist/types/modes/rpc/rpc-mode.d.ts +2 -0
- package/dist/types/modes/rpc/rpc-types.d.ts +30 -0
- package/dist/types/modes/theme/theme.d.ts +1 -1
- package/dist/types/session/agent-session.d.ts +17 -3
- package/dist/types/slash-commands/available-commands.d.ts +34 -0
- package/dist/types/tools/bash.d.ts +1 -1
- package/dist/types/tools/browser/attach.d.ts +4 -4
- package/dist/types/tools/browser/registry.d.ts +1 -0
- package/dist/types/tools/irc.d.ts +3 -2
- package/dist/types/tools/path-utils.d.ts +0 -4
- package/package.json +11 -11
- package/src/config/settings-schema.ts +40 -0
- package/src/exec/bash-executor.ts +21 -6
- package/src/extensibility/custom-commands/loader.ts +3 -1
- package/src/extensibility/custom-commands/types.ts +6 -3
- package/src/extensibility/custom-tools/loader.ts +4 -7
- package/src/extensibility/custom-tools/types.ts +8 -4
- package/src/extensibility/extensions/loader.ts +2 -1
- package/src/extensibility/extensions/types.ts +2 -2
- package/src/extensibility/hooks/loader.ts +3 -1
- package/src/extensibility/hooks/types.ts +8 -4
- package/src/internal-urls/docs-index.generated.ts +4 -4
- package/src/irc/bus.ts +14 -3
- package/src/lsp/defaults.json +6 -0
- package/src/lsp/render.ts +2 -28
- package/src/memories/index.ts +2 -0
- package/src/modes/acp/acp-agent.ts +4 -67
- package/src/modes/components/plan-review-overlay.ts +32 -3
- package/src/modes/controllers/streaming-reveal.ts +16 -8
- package/src/modes/interactive-mode.ts +32 -0
- package/src/modes/rpc/rpc-client.ts +32 -0
- package/src/modes/rpc/rpc-mode.ts +82 -7
- package/src/modes/rpc/rpc-types.ts +23 -0
- package/src/modes/theme/theme.ts +7 -7
- package/src/modes/utils/ui-helpers.ts +13 -4
- package/src/prompts/memories/consolidation_system.md +4 -0
- package/src/prompts/system/irc-autoreply.md +6 -0
- package/src/prompts/system/irc-incoming.md +1 -1
- package/src/prompts/tools/bash.md +1 -0
- package/src/prompts/tools/irc.md +1 -1
- package/src/session/agent-session.ts +95 -6
- package/src/slash-commands/available-commands.ts +105 -0
- package/src/tools/bash.ts +5 -1
- package/src/tools/browser/attach.ts +26 -7
- package/src/tools/browser/registry.ts +11 -1
- package/src/tools/irc.ts +16 -4
- package/src/tools/job.ts +7 -3
- package/src/tools/path-utils.ts +22 -15
package/src/tools/path-utils.ts
CHANGED
|
@@ -398,6 +398,11 @@ export function formatPathRelativeToCwd(
|
|
|
398
398
|
export function stripOuterDoubleQuotes(input: string): string {
|
|
399
399
|
return input.startsWith('"') && input.endsWith('"') && input.length > 1 ? input.slice(1, -1) : input;
|
|
400
400
|
}
|
|
401
|
+
function normalizePathSeparators(input: string): string {
|
|
402
|
+
if (isInternalUrlPath(input)) return input;
|
|
403
|
+
if (!input.includes("\\")) return input;
|
|
404
|
+
return input.replace(/\\/g, "/");
|
|
405
|
+
}
|
|
401
406
|
|
|
402
407
|
export function normalizePathLikeInput(input: string): string {
|
|
403
408
|
return stripOuterDoubleQuotes(input.trim());
|
|
@@ -582,19 +587,20 @@ export interface ResolvedMultiFindPattern {
|
|
|
582
587
|
targets: ResolvedFindTarget[];
|
|
583
588
|
scopePath: string;
|
|
584
589
|
}
|
|
585
|
-
|
|
586
|
-
/**
|
|
587
|
-
* Split a user path into a base path + glob pattern for tools that delegate to
|
|
588
|
-
* APIs accepting separate `path` and `glob` arguments.
|
|
589
|
-
*/
|
|
590
590
|
export function parseSearchPath(filePath: string): ParsedSearchPath {
|
|
591
|
-
const normalizedPath = filePath
|
|
592
|
-
|
|
593
|
-
|
|
591
|
+
const normalizedPath = normalizePathSeparators(filePath);
|
|
592
|
+
const segments = normalizedPath.split("/");
|
|
593
|
+
let firstGlobIndex = -1;
|
|
594
|
+
for (let i = 0; i < segments.length; i++) {
|
|
595
|
+
if (hasGlobPathChars(segments[i])) {
|
|
596
|
+
firstGlobIndex = i;
|
|
597
|
+
break;
|
|
598
|
+
}
|
|
594
599
|
}
|
|
595
600
|
|
|
596
|
-
|
|
597
|
-
|
|
601
|
+
if (firstGlobIndex === -1) {
|
|
602
|
+
return { basePath: normalizedPath };
|
|
603
|
+
}
|
|
598
604
|
|
|
599
605
|
if (firstGlobIndex <= 0) {
|
|
600
606
|
return { basePath: ".", glob: normalizedPath };
|
|
@@ -617,7 +623,7 @@ export async function parseSearchPathPreferringLiteral(filePath: string, cwd: st
|
|
|
617
623
|
if (!hasGlobPathChars(filePath) || isInternalUrlPath(filePath)) return parseSearchPath(filePath);
|
|
618
624
|
try {
|
|
619
625
|
await fs.promises.stat(resolveToCwd(filePath, cwd));
|
|
620
|
-
return { basePath: filePath };
|
|
626
|
+
return { basePath: normalizePathSeparators(filePath) };
|
|
621
627
|
} catch {
|
|
622
628
|
return parseSearchPath(filePath);
|
|
623
629
|
}
|
|
@@ -632,7 +638,8 @@ export async function parseSearchPathPreferringLiteral(filePath: string, cwd: st
|
|
|
632
638
|
// /abs/path/**/\*.ts -> { basePath: "/abs/path", globPattern: "**/*.ts", hasGlob: true }
|
|
633
639
|
// src/app -> { basePath: "src/app", globPattern: "**/*", hasGlob: false }
|
|
634
640
|
export function parseFindPattern(pattern: string): ParsedFindPattern {
|
|
635
|
-
const
|
|
641
|
+
const normalizedPattern = normalizePathSeparators(pattern);
|
|
642
|
+
const segments = normalizedPattern.split("/");
|
|
636
643
|
let firstGlobIndex = -1;
|
|
637
644
|
for (let i = 0; i < segments.length; i++) {
|
|
638
645
|
if (hasGlobPathChars(segments[i])) {
|
|
@@ -642,14 +649,14 @@ export function parseFindPattern(pattern: string): ParsedFindPattern {
|
|
|
642
649
|
}
|
|
643
650
|
|
|
644
651
|
if (firstGlobIndex === -1) {
|
|
645
|
-
return { basePath:
|
|
652
|
+
return { basePath: normalizedPattern, globPattern: "**/*", hasGlob: false };
|
|
646
653
|
}
|
|
647
654
|
|
|
648
655
|
if (firstGlobIndex === 0) {
|
|
649
|
-
const needsRecursive = !
|
|
656
|
+
const needsRecursive = !normalizedPattern.startsWith("**/");
|
|
650
657
|
return {
|
|
651
658
|
basePath: ".",
|
|
652
|
-
globPattern: needsRecursive ? `**/${
|
|
659
|
+
globPattern: needsRecursive ? `**/${normalizedPattern}` : normalizedPattern,
|
|
653
660
|
hasGlob: true,
|
|
654
661
|
};
|
|
655
662
|
}
|