Skip to content

Commit f523de9

Browse files
authored
chore(deps): bump outdated dependencies to latest (#122)
- @ai-sdk-tool/parser 4.1.20 → 4.1.21 - vitest 4.1.4 → 4.1.5 - @mariozechner/pi-tui 0.57.1 / 0.68.0 → 0.68.1 Realign @ai-sdk-tool/tui peer range for @mariozechner/pi-tui to ^0.68.1 and adapt createAliasAwareAutocompleteProvider to the async autocomplete API introduced in pi-tui 0.68 (getSuggestions now returns a Promise and accepts a { signal, force? } options argument).
1 parent 003dca1 commit f523de9

7 files changed

Lines changed: 95 additions & 96 deletions

File tree

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
"@ai-sdk-tool/tui": patch
3+
"@plugsuits/minimal-agent": patch
4+
"plugsuits": patch
5+
---
6+
7+
Bump outdated dependencies to their latest releases: `@ai-sdk-tool/parser` 4.1.21, `vitest` 4.1.5, and `@mariozechner/pi-tui` 0.68.1. Align the `@ai-sdk-tool/tui` peer range for `@mariozechner/pi-tui` to `^0.68.1` and update `createAliasAwareAutocompleteProvider` to the new async autocomplete API (`getSuggestions` now returns a `Promise<AutocompleteSuggestions | null>` and accepts the `{ signal, force? }` options object).

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,6 @@
4545
"tsx": "^4.21.0",
4646
"turbo": "^2.9.6",
4747
"ultracite": "^7.6.0",
48-
"vitest": "^4.1.4"
48+
"vitest": "^4.1.5"
4949
}
5050
}

packages/cea/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,10 @@
4040
"dependencies": {
4141
"@ai-sdk-tool/harness": "workspace:*",
4242
"@ai-sdk-tool/headless": "workspace:*",
43-
"@ai-sdk-tool/parser": "^4.1.20",
43+
"@ai-sdk-tool/parser": "^4.1.21",
4444
"@ai-sdk-tool/tui": "workspace:*",
4545
"@ai-sdk/openai-compatible": "^2.0.41",
46-
"@mariozechner/pi-tui": "^0.68.0",
46+
"@mariozechner/pi-tui": "^0.68.1",
4747
"@t3-oss/env-core": "^0.13.11",
4848
"ai": "^6.0.168",
4949
"citty": "^0.2.2",

packages/minimal-agent/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,15 @@
1717
"@ai-sdk-tool/headless": "workspace:*",
1818
"@ai-sdk-tool/tui": "workspace:*",
1919
"@ai-sdk/openai-compatible": "^2.0.41",
20-
"@mariozechner/pi-tui": "^0.57.1",
20+
"@mariozechner/pi-tui": "^0.68.1",
2121
"@t3-oss/env-core": "^0.13.11",
2222
"ai": "^6.0.168",
2323
"zod": "^4.3.6"
2424
},
2525
"devDependencies": {
2626
"@types/node": "^25.6.0",
2727
"typescript": "^6.0.3",
28-
"vitest": "^4.1.4"
28+
"vitest": "^4.1.5"
2929
},
3030
"engines": {
3131
"node": ">=22.19.0"

packages/tui/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
},
3636
"peerDependencies": {
3737
"@ai-sdk-tool/harness": "^1.2.4",
38-
"@mariozechner/pi-tui": "^0.57.1",
38+
"@mariozechner/pi-tui": "^0.68.1",
3939
"ai": "^6.0.116",
4040
"zod": "^4.3.6"
4141
},

packages/tui/src/autocomplete.ts

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import {
88
import {
99
type AutocompleteItem,
1010
type AutocompleteProvider,
11+
type AutocompleteSuggestions,
1112
CombinedAutocompleteProvider,
1213
type SlashCommand,
1314
} from "@mariozechner/pi-tui";
@@ -155,10 +156,10 @@ export const buildAliasToCanonicalNameMap = (
155156
return aliasToCanonicalName;
156157
};
157158

158-
export const getAliasArgumentSuggestions = (
159+
export const getAliasArgumentSuggestions = async (
159160
textBeforeCursor: string,
160161
commandSuggestionsByName: Map<string, SlashCommand>
161-
): { items: AutocompleteItem[]; prefix: string } | null => {
162+
): Promise<{ items: AutocompleteItem[]; prefix: string } | null> => {
162163
const spaceIndex = textBeforeCursor.indexOf(" ");
163164
if (spaceIndex < 0) {
164165
return null;
@@ -176,7 +177,7 @@ export const getAliasArgumentSuggestions = (
176177
}
177178

178179
const argumentPrefix = textBeforeCursor.slice(spaceIndex + 1);
179-
const items = command.getArgumentCompletions(argumentPrefix);
180+
const items = await command.getArgumentCompletions(argumentPrefix);
180181
if (!items || items.length === 0) {
181182
return null;
182183
}
@@ -249,26 +250,37 @@ export const createAliasAwareAutocompleteProvider = (
249250
const aliasToCanonicalName = buildAliasToCanonicalNameMap(commands);
250251

251252
return {
252-
getSuggestions: (lines, cursorLine, cursorCol) => {
253+
getSuggestions: async (
254+
lines,
255+
cursorLine,
256+
cursorCol,
257+
options
258+
): Promise<AutocompleteSuggestions | null> => {
253259
const currentLine = lines[cursorLine] ?? "";
254260
const textBeforeCursor = currentLine.slice(0, cursorCol);
255261

256262
if (!textBeforeCursor.startsWith("/")) {
257-
return fallbackProvider.getSuggestions(lines, cursorLine, cursorCol);
263+
return fallbackProvider.getSuggestions(
264+
lines,
265+
cursorLine,
266+
cursorCol,
267+
options
268+
);
258269
}
259270

260-
const aliasArgumentSuggestions = getAliasArgumentSuggestions(
271+
const aliasArgumentSuggestions = await getAliasArgumentSuggestions(
261272
textBeforeCursor,
262273
commandSuggestionsByName
263274
);
264275
if (aliasArgumentSuggestions) {
265276
return aliasArgumentSuggestions;
266277
}
267278

268-
const defaultSuggestions = fallbackProvider.getSuggestions(
279+
const defaultSuggestions = await fallbackProvider.getSuggestions(
269280
lines,
270281
cursorLine,
271-
cursorCol
282+
cursorCol,
283+
options
272284
);
273285

274286
if (textBeforeCursor.includes(" ")) {

0 commit comments

Comments
 (0)