feat: support uploaded images in debug voice preview
Allow paste/drag temporary image assets so vision turns work without a live camera frame. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -389,6 +389,30 @@ export const conversationsApi = {
|
||||
request<{ ok: boolean }>(`/api/conversations/${id}`, { method: "DELETE" }),
|
||||
};
|
||||
|
||||
// ---------- 调试会话临时图片 ----------
|
||||
export type InputImageAsset = {
|
||||
assetToken: string;
|
||||
width: number;
|
||||
height: number;
|
||||
sizeBytes: number;
|
||||
};
|
||||
|
||||
export const inputAssetsApi = {
|
||||
uploadImage: (file: File) => {
|
||||
const body = new FormData();
|
||||
body.append("file", file);
|
||||
return request<InputImageAsset>("/api/input-assets/image", {
|
||||
method: "POST",
|
||||
body,
|
||||
});
|
||||
},
|
||||
remove: (assetToken: string) =>
|
||||
request<{ ok: boolean }>(
|
||||
`/api/input-assets/${encodeURIComponent(assetToken)}`,
|
||||
{ method: "DELETE" },
|
||||
),
|
||||
};
|
||||
|
||||
// ---------- 工具 ----------
|
||||
export type ToolStatus = "active" | "archived" | "draft";
|
||||
export type ToolExecutionMode = "immediate" | "async";
|
||||
|
||||
Reference in New Issue
Block a user