@oh-my-pi/pi-coding-agent 16.3.10 → 16.3.11
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 +12 -0
- package/dist/cli.js +2928 -2928
- package/package.json +12 -12
- package/src/config/model-discovery.ts +18 -2
- package/src/internal-urls/docs-index.generated.txt +1 -1
- package/src/prompts/system/title-system.md +10 -10
- package/src/system-prompt.test.ts +34 -1
- package/src/system-prompt.ts +24 -8
- package/src/utils/title-generator.ts +40 -65
- package/src/prompts/system/title-system-marker.md +0 -17
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"type": "module",
|
|
3
3
|
"name": "@oh-my-pi/pi-coding-agent",
|
|
4
|
-
"version": "16.3.
|
|
4
|
+
"version": "16.3.11",
|
|
5
5
|
"description": "Coding agent CLI with read, bash, edit, write tools and session management",
|
|
6
6
|
"homepage": "https://omp.sh",
|
|
7
7
|
"author": "Can Boluk",
|
|
@@ -56,17 +56,17 @@
|
|
|
56
56
|
"@agentclientprotocol/sdk": "0.25.0",
|
|
57
57
|
"@babel/parser": "^7.29.7",
|
|
58
58
|
"@mozilla/readability": "^0.6.0",
|
|
59
|
-
"@oh-my-pi/hashline": "16.3.
|
|
60
|
-
"@oh-my-pi/omp-stats": "16.3.
|
|
61
|
-
"@oh-my-pi/pi-agent-core": "16.3.
|
|
62
|
-
"@oh-my-pi/pi-ai": "16.3.
|
|
63
|
-
"@oh-my-pi/pi-catalog": "16.3.
|
|
64
|
-
"@oh-my-pi/pi-mnemopi": "16.3.
|
|
65
|
-
"@oh-my-pi/pi-natives": "16.3.
|
|
66
|
-
"@oh-my-pi/pi-tui": "16.3.
|
|
67
|
-
"@oh-my-pi/pi-utils": "16.3.
|
|
68
|
-
"@oh-my-pi/pi-wire": "16.3.
|
|
69
|
-
"@oh-my-pi/snapcompact": "16.3.
|
|
59
|
+
"@oh-my-pi/hashline": "16.3.11",
|
|
60
|
+
"@oh-my-pi/omp-stats": "16.3.11",
|
|
61
|
+
"@oh-my-pi/pi-agent-core": "16.3.11",
|
|
62
|
+
"@oh-my-pi/pi-ai": "16.3.11",
|
|
63
|
+
"@oh-my-pi/pi-catalog": "16.3.11",
|
|
64
|
+
"@oh-my-pi/pi-mnemopi": "16.3.11",
|
|
65
|
+
"@oh-my-pi/pi-natives": "16.3.11",
|
|
66
|
+
"@oh-my-pi/pi-tui": "16.3.11",
|
|
67
|
+
"@oh-my-pi/pi-utils": "16.3.11",
|
|
68
|
+
"@oh-my-pi/pi-wire": "16.3.11",
|
|
69
|
+
"@oh-my-pi/snapcompact": "16.3.11",
|
|
70
70
|
"@opentelemetry/api": "^1.9.1",
|
|
71
71
|
"@opentelemetry/context-async-hooks": "^2.7.1",
|
|
72
72
|
"@opentelemetry/exporter-trace-otlp-proto": "^0.218.0",
|
|
@@ -158,6 +158,7 @@ type LlamaCppDiscoveredModelRuntimeMetadata = {
|
|
|
158
158
|
|
|
159
159
|
type LlamaCppModelListEntry = {
|
|
160
160
|
id: string;
|
|
161
|
+
input?: ("text" | "image")[];
|
|
161
162
|
runtimeContextWindow?: number;
|
|
162
163
|
/**
|
|
163
164
|
* `--ctx-size` extracted from the entry's `status.args` (rendered CLI arg
|
|
@@ -276,6 +277,20 @@ function extractLlamaCppModelContextWindows(
|
|
|
276
277
|
};
|
|
277
278
|
}
|
|
278
279
|
|
|
280
|
+
function extractLlamaCppModelInputCapabilities(item: Record<string, unknown>): ("text" | "image")[] | undefined {
|
|
281
|
+
const architecture = item.architecture;
|
|
282
|
+
if (!isRecord(architecture) || !Array.isArray(architecture.input_modalities)) {
|
|
283
|
+
return undefined;
|
|
284
|
+
}
|
|
285
|
+
const modalities = new Set<string>();
|
|
286
|
+
for (const modality of architecture.input_modalities) {
|
|
287
|
+
if (typeof modality === "string") {
|
|
288
|
+
modalities.add(modality.toLowerCase());
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
return modalities.has("image") ? ["text", "image"] : ["text"];
|
|
292
|
+
}
|
|
293
|
+
|
|
279
294
|
function parseLlamaCppModelList(payload: unknown): LlamaCppModelListEntry[] {
|
|
280
295
|
if (!isRecord(payload) || !Array.isArray(payload.data)) {
|
|
281
296
|
return [];
|
|
@@ -287,6 +302,7 @@ function parseLlamaCppModelList(payload: unknown): LlamaCppModelListEntry[] {
|
|
|
287
302
|
return [
|
|
288
303
|
{
|
|
289
304
|
id: item.id,
|
|
305
|
+
input: extractLlamaCppModelInputCapabilities(item),
|
|
290
306
|
...extractLlamaCppModelContextWindows(item),
|
|
291
307
|
configuredContextWindow: extractLlamaCppConfiguredContextWindow(item),
|
|
292
308
|
},
|
|
@@ -545,7 +561,7 @@ export async function discoverLlamaCppModels(
|
|
|
545
561
|
provider: providerConfig.provider,
|
|
546
562
|
baseUrl,
|
|
547
563
|
reasoning: false,
|
|
548
|
-
input: serverMetadata?.input ?? ["text"],
|
|
564
|
+
input: item.input ?? serverMetadata?.input ?? ["text"],
|
|
549
565
|
imageInputDecoder: "stb",
|
|
550
566
|
cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 },
|
|
551
567
|
contextWindow,
|
|
@@ -595,7 +611,7 @@ export async function discoverLlamaCppModelRuntimeMetadata(
|
|
|
595
611
|
entry.configuredContextWindow ??
|
|
596
612
|
serverMetadata?.contextWindow ??
|
|
597
613
|
entry.trainingContextWindow;
|
|
598
|
-
const input = serverMetadata?.input;
|
|
614
|
+
const input = entry.input ?? serverMetadata?.input;
|
|
599
615
|
if (contextWindow === undefined) {
|
|
600
616
|
return input === undefined ? undefined : { input };
|
|
601
617
|
}
|