File tree Expand file tree Collapse file tree
apps/sim/tools/google_drive Expand file tree Collapse file tree Original file line number Diff line number Diff 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 ? / \b t r a s h e d \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 )
You can’t perform that action at this time.
0 commit comments