@link-assistant/agent 0.25.2 → 0.25.3
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/package.json +3 -3
- package/src/session/compaction.ts +2 -7
- package/src/session/prompt.ts +6 -16
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@link-assistant/agent",
|
|
3
|
-
"version": "0.25.
|
|
3
|
+
"version": "0.25.3",
|
|
4
4
|
"description": "A minimal, public domain AI CLI agent compatible with OpenCode's JSON interface. Bun-only runtime.",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
"@ai-sdk/mcp": "^0.0.8",
|
|
65
65
|
"@ai-sdk/mistral": "^2.0.27",
|
|
66
66
|
"@ai-sdk/openai": "^2.0.89",
|
|
67
|
-
"@ai-sdk/openai-compatible": "^
|
|
67
|
+
"@ai-sdk/openai-compatible": "^2.0.62",
|
|
68
68
|
"@ai-sdk/xai": "^2.0.33",
|
|
69
69
|
"@clack/prompts": "^0.11.0",
|
|
70
70
|
"@hono/standard-validator": "^0.2.0",
|
|
@@ -82,7 +82,7 @@
|
|
|
82
82
|
"@standard-community/standard-json": "^0.3.5",
|
|
83
83
|
"@standard-community/standard-openapi": "^0.2.9",
|
|
84
84
|
"@zip.js/zip.js": "^2.8.10",
|
|
85
|
-
"ai": "^6.0.
|
|
85
|
+
"ai": "^6.0.235",
|
|
86
86
|
"chokidar": "^4.0.3",
|
|
87
87
|
"clipboardy": "^5.0.0",
|
|
88
88
|
"command-stream": "^0.7.1",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { streamText, wrapLanguageModel
|
|
1
|
+
import { streamText, wrapLanguageModel } from 'ai';
|
|
2
2
|
import { Session } from '.';
|
|
3
3
|
import { Identifier } from '../id/id';
|
|
4
4
|
import { Instance } from '../project/instance';
|
|
@@ -384,13 +384,8 @@ export namespace SessionCompaction {
|
|
|
384
384
|
headers: model.info.headers,
|
|
385
385
|
abortSignal: input.abort,
|
|
386
386
|
tools: model.info.tool_call ? {} : undefined,
|
|
387
|
+
system: system.map((content) => ({ role: 'system', content })),
|
|
387
388
|
messages: [
|
|
388
|
-
...system.map(
|
|
389
|
-
(x): ModelMessage => ({
|
|
390
|
-
role: 'system',
|
|
391
|
-
content: x,
|
|
392
|
-
})
|
|
393
|
-
),
|
|
394
389
|
...safeModelMessages,
|
|
395
390
|
{
|
|
396
391
|
role: 'user',
|
package/src/session/prompt.ts
CHANGED
|
@@ -12,7 +12,6 @@ import { Provider } from '../provider/provider';
|
|
|
12
12
|
import {
|
|
13
13
|
generateText,
|
|
14
14
|
streamText,
|
|
15
|
-
type ModelMessage,
|
|
16
15
|
type Tool as AITool,
|
|
17
16
|
tool,
|
|
18
17
|
wrapLanguageModel,
|
|
@@ -990,15 +989,8 @@ export namespace SessionPrompt {
|
|
|
990
989
|
stopWhen: stepCountIs(1),
|
|
991
990
|
temperature: params.temperature,
|
|
992
991
|
topP: params.topP,
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
(x): ModelMessage => ({
|
|
996
|
-
role: 'system',
|
|
997
|
-
content: x,
|
|
998
|
-
})
|
|
999
|
-
),
|
|
1000
|
-
...safeModelMessages,
|
|
1001
|
-
],
|
|
992
|
+
system: system.map((content) => ({ role: 'system', content })),
|
|
993
|
+
messages: safeModelMessages,
|
|
1002
994
|
tools: model.info?.tool_call === false ? undefined : tools,
|
|
1003
995
|
model: wrapLanguageModel({
|
|
1004
996
|
model: model.language,
|
|
@@ -1925,13 +1917,11 @@ export namespace SessionPrompt {
|
|
|
1925
1917
|
small.providerID,
|
|
1926
1918
|
options
|
|
1927
1919
|
),
|
|
1920
|
+
system: safeTitleSystemMessages.map((content) => ({
|
|
1921
|
+
role: 'system',
|
|
1922
|
+
content,
|
|
1923
|
+
})),
|
|
1928
1924
|
messages: [
|
|
1929
|
-
...safeTitleSystemMessages.map(
|
|
1930
|
-
(x): ModelMessage => ({
|
|
1931
|
-
role: 'system',
|
|
1932
|
-
content: x,
|
|
1933
|
-
})
|
|
1934
|
-
),
|
|
1935
1925
|
{
|
|
1936
1926
|
role: 'user' as const,
|
|
1937
1927
|
content: `
|