Skip to content

Commit 7c5888c

Browse files
authored
Update chat, desktop, and template surfaces (#2795)
* feat: update chat, desktop, and template surfaces * docs: align localized file upload provider guidance * docs: format framework and template documentation * fix: surface storage and URL parsing failures * fix: address PR review feedback * fix: tighten chat history rail hover state * chore: add toolkit release changeset * fix: restore macOS Cmd+H hide shortcut * fix: address follow-up review feedback * fix: harden form metadata and storage failures
1 parent 711c15f commit 7c5888c

240 files changed

Lines changed: 6190 additions & 1461 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.agents/skills/delegate-to-agent/SKILL.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,34 @@ sendToAgentChat({
4949
});
5050
```
5151

52+
### Keep user text separate from injected context
53+
54+
Treat the visible `message` as the user's request or the shortest clear
55+
description of an app-initiated operation. Put context the user did not type —
56+
IDs, URLs, filenames, current selection or screen state, serialized records,
57+
upload instructions, and bounded source excerpts — in the `context` field.
58+
`context` is model input carried through the agent turn; it is stripped from
59+
the rendered user message, so do not concatenate it into `message` with labels,
60+
blank-line sections, or `<context>` tags yourself.
61+
62+
Use the related surface for each kind of supporting input:
63+
64+
| Surface | Use for |
65+
| --- | --- |
66+
| `message` | User-authored intent or a concise app action description |
67+
| `context` | Derived metadata and bounded text needed to carry out that intent |
68+
| `setAgentChatContextItem` | Context staged for a later user-submitted prompt; keep it keyed so updates replace stale context |
69+
| `images`, `referenceImagePaths`, attachments | Binary or visual inputs; describe only the handling instructions in `context` |
70+
71+
If an app builds a prompt from a form, selection, upload, or editor state, keep
72+
the visible message short and pass the assembled details as `context`. Preserve
73+
the user's actual freeform text in `message` when it is the request; do not
74+
restate it as metadata in `context` unless the agent needs a structured copy.
75+
76+
This boundary applies to auto-submitted turns and prefills. A hidden context
77+
field is not a license to send unbounded records or secrets: cap excerpts,
78+
prefer stable IDs and URLs, and use an action or resource lookup for full data.
79+
5280
**From the UI, in the background:**
5381

5482
```ts

.agents/skills/extensions/SKILL.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,8 +129,12 @@ Extensions have full access to app data via helpers injected into the iframe
129129
in chat, record passive control/selection output at
130130
`inline-ui:<extensionId>:output` in application state so the agent can read it
131131
later with `readAppState`.
132-
- `agentNative.chat.send(message, opts?)` — send a visible prompt or selected
133-
value back into the current agent chat.
132+
- `agentNative.chat.send(message, opts?)` - send a visible prompt or selected
133+
value back into the current agent chat. The extension bridge keeps messages
134+
draft-only unless `opts.submit === true`; pass `{ submit: true }` only from a
135+
user-triggered Apply or Submit action. Never call it from polling, refresh, or
136+
error handlers; use application state or `agentNative.ui.output` for passive
137+
results.
134138

135139
For transient inline generative UI, `extensionData` is host-browser
136140
`localStorage`: the agent cannot read it, it does not sync across devices, it

.agents/skills/extensions/references/api.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ await dbExec("UPDATE notes SET title = 'Updated Title' WHERE id = 'abc'");
137137
| `extensionData.get(collection, id, opts?)` | Get a single item by id | `extensionData.get('todos', 'todo-1')` |
138138
| `extensionData.remove(collection, id, opts?)` | Delete an item | `extensionData.remove('todos', 'todo-1')` |
139139
| `agentNative.ui.output(value, opts?)` | Record passive inline UI output in application state | `agentNative.ui.output({ threshold })` |
140-
| `agentNative.chat.send(message, opts?)` | Send a visible prompt or selected value back to chat | `agentNative.chat.send('Use Q2', { context: { q: 2 } })` |
140+
| `agentNative.chat.send(message, opts?)` | Send a visible prompt or selected value back to chat | `agentNative.chat.send('Use Q2', { submit: true, context: { q: 2 } })` |
141141

142142
## Persisting Custom Data
143143

.agents/skills/generative-ui/SKILL.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,9 @@ The stored payload includes `value`, `updatedAt`, `extensionId`, and
7676
7777
Use `agentNative.chat.send(message, opts?)` or `sendToAgentChat(message, opts?)`
7878
for a visible Apply/Submit button that should send a prompt or selected value
79-
into the chat.
79+
into the chat. Pass `{ submit: true }` explicitly for that user-triggered
80+
action; extension messages are draft-only otherwise. Never call these helpers
81+
from polling, refresh, or error handlers.
8082
8183
## App Data And State
8284
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@agent-native/toolkit": patch
3+
---
4+
5+
Make chat history rail overflow actions replace timestamps without layout shifts.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@agent-native/core": minor
3+
---
4+
5+
Store chat attachments as durable object-storage references and surface Builder/custom storage setup during onboarding.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@agent-native/core": patch
3+
---
4+
5+
Keep sandboxed extension chat messages draft-only unless a user action explicitly submits them.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@agent-native/dispatch": patch
3+
---
4+
5+
Render integrations and scheduled work as first-class, chrome-less Electron control-plane pages.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@agent-native/core": patch
3+
---
4+
5+
Keep email and magic-link callbacks with tracking parameters compatible with Better Auth.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@agent-native/dispatch": patch
3+
---
4+
5+
Hide the generic Chat starter from Dispatch's default app launchers.

0 commit comments

Comments
 (0)