From e379ccf6d14fe80da06c51c9264404a04b2551c2 Mon Sep 17 00:00:00 2001 From: water <672684719@qq.com> Date: Thu, 13 Aug 2026 21:50:47 +0800 Subject: [PATCH] feat: add createDirectory method to FileClient --- src/client/file-client.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/client/file-client.ts b/src/client/file-client.ts index 30d2767..e045890 100644 --- a/src/client/file-client.ts +++ b/src/client/file-client.ts @@ -25,7 +25,7 @@ export class FileClient { this.apiKey = options.apiKey; this.client = new HttpClient({ baseUrl: this.host, - apiKey: this.apiKey, + apiKey: options.apiKey, timeout: options.timeout || 60000, }); } @@ -96,6 +96,13 @@ export class FileClient { return this.uploadFile(text, destinationPath, fileName); } + async createDirectory(path: string): Promise { + const response = await this.client.post('/api/file/create_directory', null, { + params: { path }, + }); + return response.data; + } + async downloadTrajectory(conversationId: string): Promise { const response = await this.client.get( `/api/file/download-trajectory/${encodeURIComponent(conversationId)}`,