@stacksjs/defaults 0.75.73 → 0.75.74
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.
|
@@ -80,6 +80,24 @@ const result = await bedrock.chat([{ role: 'user', content: 'Hello' }], { system
|
|
|
80
80
|
- `buddy ai:access` (or `requestModelAccess()`) makes the models in
|
|
81
81
|
`config/ai.ts` invocable and reports each one.
|
|
82
82
|
|
|
83
|
+
## Tool Calls
|
|
84
|
+
|
|
85
|
+
```typescript
|
|
86
|
+
import { assistantTurn, toolResultsTurn } from '@stacksjs/ai'
|
|
87
|
+
|
|
88
|
+
const result = await client.generate(messages, { tools })
|
|
89
|
+
// result.toolCalls: [{ id, name, arguments }] - same shape from every driver
|
|
90
|
+
messages.push(assistantTurn(result), toolResultsTurn(
|
|
91
|
+
result.toolCalls!.map(call => ({ toolCallId: call.id, name: call.name, content: run(call) })),
|
|
92
|
+
))
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
- `content` is the model's text, `''` when it only called tools.
|
|
96
|
+
- The `responseFormat` structured-output tool is internal: its JSON is
|
|
97
|
+
`content`, never a tool call.
|
|
98
|
+
- Ollama refuses `toolChoice: 'required'` / `{ name }`; it cannot force a call.
|
|
99
|
+
- `streamChat()` streams text only.
|
|
100
|
+
|
|
83
101
|
## Provider-Neutral Client
|
|
84
102
|
|
|
85
103
|
Use the config-driven client for application features that can run against
|
package/ide/vscode/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"publisher": "Stacks",
|
|
3
3
|
"name": "vscode-stacks",
|
|
4
4
|
"displayName": "Stacks",
|
|
5
|
-
"version": "0.75.
|
|
5
|
+
"version": "0.75.74",
|
|
6
6
|
"description": "Stacks, built into VS Code: stx templates, pickier linting and formatting, encrypted env files, the dev server preview and every buddy command. No other extensions required.",
|
|
7
7
|
"license": "MIT",
|
|
8
8
|
"funding": "https://github.com/sponsors/chrisbbreuer",
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@stacksjs/defaults",
|
|
3
3
|
"type": "module",
|
|
4
4
|
"sideEffects": false,
|
|
5
|
-
"version": "0.75.
|
|
5
|
+
"version": "0.75.74",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
8
8
|
"url": "git+https://github.com/stacksjs/stacks.git",
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
"dependencies": {
|
|
56
56
|
"@iconify-json/f7": "^1.2.2",
|
|
57
57
|
"@iconify-json/hugeicons": "^1.2.35",
|
|
58
|
-
"@stacksjs/mobile": "^0.75.
|
|
58
|
+
"@stacksjs/mobile": "^0.75.74",
|
|
59
59
|
"@stacksjs/sanitizer": "^0.2.374",
|
|
60
60
|
"ts-qr-codes": "^0.1.8"
|
|
61
61
|
}
|
|
@@ -148,6 +148,20 @@ const shellClass = derived(() => `${nativeMobile() ? 'native-mobile ' : ''}${cla
|
|
|
148
148
|
padding-bottom: var(--native-safe-area-bottom);
|
|
149
149
|
}
|
|
150
150
|
|
|
151
|
+
/* While the keyboard is up, the tab bar steps aside, as iOS does: left in
|
|
152
|
+
place it rode up on top of the keyboard and took a fifth of the screen
|
|
153
|
+
from whatever was being typed. Hidden rather than removed, so the
|
|
154
|
+
content's clearance below stays and nothing jumps when it comes back. */
|
|
155
|
+
.native-app-shell.native-mobile:has(:is(input:not([type=checkbox], [type=radio], [type=range], [type=button], [type=submit], [type=file]), textarea, select, [contenteditable=true]):focus) .native-app-tab-slot {
|
|
156
|
+
visibility: hidden;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
@media (max-width: 767.98px) and (pointer: coarse) {
|
|
160
|
+
.native-app-shell:has(:is(input:not([type=checkbox], [type=radio], [type=range], [type=button], [type=submit], [type=file]), textarea, select, [contenteditable=true]):focus) .native-app-tab-slot {
|
|
161
|
+
visibility: hidden;
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
|
|
151
165
|
/* A phone app does not select its chrome on a long press, or flash it grey
|
|
152
166
|
on a tap. Text inside the content is left selectable. */
|
|
153
167
|
.native-app-shell.native-mobile .native-app-tab-slot,
|
|
@@ -40,6 +40,12 @@ describe('Native components', () => {
|
|
|
40
40
|
expect(bar).toContain("useReactiveProp<string>('title', '')")
|
|
41
41
|
})
|
|
42
42
|
|
|
43
|
+
it('steps the tab bar aside while the keyboard is up', () => {
|
|
44
|
+
const shell = read('NativeAppShell')
|
|
45
|
+
expect(shell).toContain('textarea, select, [contenteditable=true]):focus) .native-app-tab-slot')
|
|
46
|
+
expect(shell).toContain('visibility: hidden;')
|
|
47
|
+
})
|
|
48
|
+
|
|
43
49
|
it('keeps every text field big enough that iOS does not zoom into it', () => {
|
|
44
50
|
expect(read('NativeAppShell')).toContain('.native-app-shell :is(input, textarea, select) { font-size: max(16px, 1em); }')
|
|
45
51
|
})
|