feat: update chat prompt (#6639)

fix AFF-878
fix AFF-852 (maybe)
This commit is contained in:
darkskygit
2024-04-19 12:34:02 +00:00
parent 94a70a5f3a
commit 657a5250ad
6 changed files with 42 additions and 4 deletions

View File

@@ -1,3 +1,5 @@
import { createHash } from 'node:crypto';
import { BadRequestException, Logger } from '@nestjs/common';
import {
Args,
@@ -285,10 +287,13 @@ export class CopilotResolver {
for (const blob of blobs) {
const uploaded = await this.storage.handleUpload(user.id, blob);
const filename = createHash('sha256')
.update(uploaded.buffer)
.digest('base64url');
const link = await this.storage.put(
user.id,
workspaceId,
uploaded.filename,
filename,
uploaded.buffer
);
options.attachments.push(link);