We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 891f9a7 commit 9484100Copy full SHA for 9484100
1 file changed
packages/code-api/src/antcode/antcode.service.ts
@@ -262,6 +262,11 @@ export class AntCodeAPIService implements ICodeAPIService {
262
}
263
264
async searchFile(repo: IRepositoryModel, searchString: string, options: { limit: number }) {
265
+ // 如果 query 为空字符串则直接返回,否则 antcode 接口会 400
266
+ // TODO:目前 OpenSumi 默认为 '',后续得实现 queryBuilder 逻辑
267
+ if (searchString === '') {
268
+ return [];
269
+ }
270
const reqRes = await this.request<string[]>(
271
`/api/v3/projects/${this.getProjectId(repo)}/repository/files_search`,
272
{
0 commit comments