chore: add copilot vision dev mode polyfill (#6671)

This commit is contained in:
darkskygit
2024-04-23 07:41:01 +00:00
parent f1b03989fa
commit cbe9e10d44

View File

@@ -31,6 +31,10 @@ export class CopilotStorage {
) {
const name = `${userId}/${workspaceId}/${key}`;
await this.provider.put(name, blob);
if (this.config.node.dev) {
// return image base64url for dev environment
return `data:image/png;base64,${blob.toString('base64')}`;
}
return `${this.config.baseUrl}/api/copilot/blob/${name}`;
}