@github/copilot-sdk 0.1.16 → 0.1.17
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/README.md +22 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -183,6 +183,28 @@ Sessions emit various events during processing:
|
|
|
183
183
|
|
|
184
184
|
See `SessionEvent` type in the source for full details.
|
|
185
185
|
|
|
186
|
+
## Image Support
|
|
187
|
+
|
|
188
|
+
The SDK supports image attachments via the `attachments` parameter. You can attach images by providing their file path:
|
|
189
|
+
|
|
190
|
+
```typescript
|
|
191
|
+
await session.send({
|
|
192
|
+
prompt: "What's in this image?",
|
|
193
|
+
attachments: [
|
|
194
|
+
{
|
|
195
|
+
type: "file",
|
|
196
|
+
path: "/path/to/image.jpg",
|
|
197
|
+
},
|
|
198
|
+
],
|
|
199
|
+
});
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
Supported image formats include JPG, PNG, GIF, and other common image types. The agent's `view` tool can also read images directly from the filesystem, so you can also ask questions like:
|
|
203
|
+
|
|
204
|
+
```typescript
|
|
205
|
+
await session.send({ prompt: "What does the most recent jpg in this directory portray?" });
|
|
206
|
+
```
|
|
207
|
+
|
|
186
208
|
## Streaming
|
|
187
209
|
|
|
188
210
|
Enable streaming to receive assistant response chunks as they're generated:
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"type": "git",
|
|
5
5
|
"url": "https://github.com/github/copilot-sdk.git"
|
|
6
6
|
},
|
|
7
|
-
"version": "0.1.
|
|
7
|
+
"version": "0.1.17",
|
|
8
8
|
"description": "TypeScript SDK for programmatic control of GitHub Copilot CLI via JSON-RPC",
|
|
9
9
|
"main": "./dist/index.js",
|
|
10
10
|
"types": "./dist/index.d.ts",
|