Skip to content

Commit 7b6fadc

Browse files
committed
fix(google_drive): revert list.ts trashed guard — query is plain text, not gdrive syntax
1 parent e236c89 commit 7b6fadc

1 file changed

Lines changed: 5 additions & 7 deletions

File tree

apps/sim/tools/google_drive/list.ts

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -66,13 +66,11 @@ export const listTool: ToolConfig<GoogleDriveToolParams, GoogleDriveListResponse
6666
const escapeQueryValue = (value: string): string =>
6767
value.replace(/\\/g, '\\\\').replace(/'/g, "\\'")
6868

69-
// Build the query conditions. Default to excluding trashed files unless
70-
// the user-supplied query explicitly specifies a `trashed = ...` predicate.
71-
const userSpecifiesTrashed = params.query ? /\btrashed\s*=/.test(params.query) : false
72-
const conditions: string[] = []
73-
if (!userSpecifiesTrashed) {
74-
conditions.push('trashed = false')
75-
}
69+
// Build the query conditions. `params.query` here is a plain-text name
70+
// search term (wrapped in `name contains '...'` below), not Google Drive
71+
// query syntax — so there's no caller-supplied `trashed` predicate to
72+
// honour. Always exclude trashed files.
73+
const conditions: string[] = ['trashed = false']
7674
const folderId = (params.folderId || params.folderSelector)?.trim()
7775
if (folderId) {
7876
const escapedFolderId = escapeQueryValue(folderId)

0 commit comments

Comments
 (0)