pi-cc-extensions 0.8.5 → 0.8.7
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.
|
@@ -88,7 +88,7 @@ export function createAgentAutocompleteProvider(
|
|
|
88
88
|
const [baseSuggestions, matches] = await Promise.all([
|
|
89
89
|
current.getSuggestions(lines, cursorLine, cursorCol, options),
|
|
90
90
|
Promise.resolve(query.trim()
|
|
91
|
-
? fuzzyFilter(agents, query, (a) =>
|
|
91
|
+
? fuzzyFilter(agents, query, (a) => a.name)
|
|
92
92
|
: agents),
|
|
93
93
|
]);
|
|
94
94
|
if (options.signal.aborted) return null;
|
|
@@ -101,8 +101,10 @@ export function createAgentAutocompleteProvider(
|
|
|
101
101
|
description: agent.description
|
|
102
102
|
+ (agent.model ? ` · ${agent.model}` : ""),
|
|
103
103
|
}));
|
|
104
|
-
const
|
|
105
|
-
|
|
104
|
+
const hasCompatibleBaseSuggestions = baseSuggestions?.prefix === `@${query}`;
|
|
105
|
+
const agentValues = new Set(agents.map((agent) => `@${agent.name}`));
|
|
106
|
+
const baseItems = hasCompatibleBaseSuggestions
|
|
107
|
+
? baseSuggestions.items.filter((item) => !agentValues.has(item.value))
|
|
106
108
|
: [];
|
|
107
109
|
const seen = new Set<string>();
|
|
108
110
|
const items = [...agentItems, ...baseItems].filter((item) => {
|
|
@@ -112,7 +114,7 @@ export function createAgentAutocompleteProvider(
|
|
|
112
114
|
return true;
|
|
113
115
|
});
|
|
114
116
|
|
|
115
|
-
if (items.length === 0) return baseSuggestions;
|
|
117
|
+
if (items.length === 0 && !hasCompatibleBaseSuggestions) return baseSuggestions;
|
|
116
118
|
return { items, prefix: `@${query}` };
|
|
117
119
|
},
|
|
118
120
|
|
|
@@ -501,7 +501,7 @@ function anchorCurrentThoughtTo(info: ToolInfo) {
|
|
|
501
501
|
|
|
502
502
|
function currentThoughtLine(toolCallId: string, theme: Theme): string {
|
|
503
503
|
if (!thoughtTickerEnabled() || state.thoughtAnchorId !== toolCallId || !state.currentThoughtHeading) return "";
|
|
504
|
-
const prefix = "↳ ";
|
|
504
|
+
const prefix = " ↳ ";
|
|
505
505
|
const budget = previewWidth((process.stdout.columns || 100) - prefix.length);
|
|
506
506
|
return theme.fg("dim", prefix) + theme.fg("thinkingText", limitPlain(state.currentThoughtHeading, budget));
|
|
507
507
|
}
|
|
@@ -625,11 +625,12 @@ function compactToolLine(
|
|
|
625
625
|
isError: info.isError,
|
|
626
626
|
hasResult: result != null || !!info.result,
|
|
627
627
|
});
|
|
628
|
-
|
|
628
|
+
const indent = " ";
|
|
629
|
+
if (!isBurst) return indent + marker + theme.fg("muted", limitPlain(details));
|
|
629
630
|
|
|
630
631
|
const prefix = `${info.burstCount}× `;
|
|
631
|
-
const budget = previewWidth((process.stdout.columns || 100) - prefix.length - MARKER_WIDTH);
|
|
632
|
-
return marker + theme.fg("muted", prefix + limitPlain(details, budget));
|
|
632
|
+
const budget = previewWidth((process.stdout.columns || 100) - indent.length - prefix.length - MARKER_WIDTH);
|
|
633
|
+
return indent + marker + theme.fg("muted", prefix + limitPlain(details, budget));
|
|
633
634
|
}
|
|
634
635
|
|
|
635
636
|
function shouldCompactComponent(component: any, mode: CompactStyleMode): boolean {
|
|
@@ -1019,7 +1020,11 @@ export class DynamicSummaryComponent {
|
|
|
1019
1020
|
render(width: number): string[] {
|
|
1020
1021
|
const line = currentMode() !== "off" ? summaryLine(this.data) : "";
|
|
1021
1022
|
if (!line) return [];
|
|
1022
|
-
|
|
1023
|
+
const italic = typeof (this.theme as any).italic === "function"
|
|
1024
|
+
? (this.theme as any).italic(this.theme.fg("muted", line))
|
|
1025
|
+
: this.theme.fg("muted", line);
|
|
1026
|
+
const prefix = this.theme.fg("borderMuted", "│ ");
|
|
1027
|
+
return new Text(prefix + italic, 0, 0).render(width);
|
|
1023
1028
|
}
|
|
1024
1029
|
}
|
|
1025
1030
|
|