@@ -159,13 +159,62 @@ Return ONLY the hold name - no explanations, no quotes, no extra text.`,
159159 placeholder : 'Org Unit ID (alternative to emails)' ,
160160 condition : { field : 'operation' , value : [ 'create_matters_holds' , 'create_matters_export' ] } ,
161161 } ,
162- // Date filtering for exports and holds (holds only support MAIL and GROUPS corpus)
162+ // Date filtering for exports (works with all corpus types )
163163 {
164164 id : 'startTime' ,
165165 title : 'Start Time' ,
166166 type : 'short-input' ,
167167 placeholder : 'YYYY-MM-DDTHH:mm:ssZ' ,
168- condition : { field : 'operation' , value : [ 'create_matters_export' , 'create_matters_holds' ] } ,
168+ condition : { field : 'operation' , value : 'create_matters_export' } ,
169+ wandConfig : {
170+ enabled : true ,
171+ prompt : `Generate an ISO 8601 timestamp in GMT based on the user's description for Google Vault date filtering.
172+ The timestamp should be in the format: YYYY-MM-DDTHH:mm:ssZ (UTC timezone).
173+ Note: Google Vault rounds times to 12 AM on the specified date.
174+ Examples:
175+ - "yesterday" -> Calculate yesterday's date at 00:00:00Z
176+ - "last week" -> Calculate 7 days ago at 00:00:00Z
177+ - "beginning of this month" -> Calculate the 1st of current month at 00:00:00Z
178+ - "January 1, 2024" -> 2024-01-01T00:00:00Z
179+
180+ Return ONLY the timestamp string - no explanations, no quotes, no extra text.` ,
181+ placeholder : 'Describe the start date (e.g., "last month", "January 1, 2024")...' ,
182+ generationType : 'timestamp' ,
183+ } ,
184+ } ,
185+ {
186+ id : 'endTime' ,
187+ title : 'End Time' ,
188+ type : 'short-input' ,
189+ placeholder : 'YYYY-MM-DDTHH:mm:ssZ' ,
190+ condition : { field : 'operation' , value : 'create_matters_export' } ,
191+ wandConfig : {
192+ enabled : true ,
193+ prompt : `Generate an ISO 8601 timestamp in GMT based on the user's description for Google Vault date filtering.
194+ The timestamp should be in the format: YYYY-MM-DDTHH:mm:ssZ (UTC timezone).
195+ Note: Google Vault rounds times to 12 AM on the specified date.
196+ Examples:
197+ - "now" -> Current timestamp
198+ - "today" -> Today's date at 23:59:59Z
199+ - "end of last month" -> Last day of previous month at 23:59:59Z
200+ - "December 31, 2024" -> 2024-12-31T23:59:59Z
201+
202+ Return ONLY the timestamp string - no explanations, no quotes, no extra text.` ,
203+ placeholder : 'Describe the end date (e.g., "today", "end of last quarter")...' ,
204+ generationType : 'timestamp' ,
205+ } ,
206+ } ,
207+ // Date filtering for holds (only works with MAIL and GROUPS corpus)
208+ {
209+ id : 'startTime' ,
210+ title : 'Start Time' ,
211+ type : 'short-input' ,
212+ placeholder : 'YYYY-MM-DDTHH:mm:ssZ' ,
213+ condition : {
214+ field : 'operation' ,
215+ value : 'create_matters_holds' ,
216+ and : { field : 'corpus' , value : [ 'MAIL' , 'GROUPS' ] } ,
217+ } ,
169218 wandConfig : {
170219 enabled : true ,
171220 prompt : `Generate an ISO 8601 timestamp in GMT based on the user's description for Google Vault date filtering.
@@ -187,7 +236,11 @@ Return ONLY the timestamp string - no explanations, no quotes, no extra text.`,
187236 title : 'End Time' ,
188237 type : 'short-input' ,
189238 placeholder : 'YYYY-MM-DDTHH:mm:ssZ' ,
190- condition : { field : 'operation' , value : [ 'create_matters_export' , 'create_matters_holds' ] } ,
239+ condition : {
240+ field : 'operation' ,
241+ value : 'create_matters_holds' ,
242+ and : { field : 'corpus' , value : [ 'MAIL' , 'GROUPS' ] } ,
243+ } ,
191244 wandConfig : {
192245 enabled : true ,
193246 prompt : `Generate an ISO 8601 timestamp in GMT based on the user's description for Google Vault date filtering.
@@ -204,12 +257,13 @@ Return ONLY the timestamp string - no explanations, no quotes, no extra text.`,
204257 generationType : 'timestamp' ,
205258 } ,
206259 } ,
260+ // Search terms for exports (works with all corpus types)
207261 {
208262 id : 'terms' ,
209263 title : 'Search Terms' ,
210264 type : 'long-input' ,
211265 placeholder : 'Enter search query (e.g., from:user@example.com subject:confidential)' ,
212- condition : { field : 'operation' , value : [ 'create_matters_export' , 'create_matters_holds' ] } ,
266+ condition : { field : 'operation' , value : 'create_matters_export' } ,
213267 wandConfig : {
214268 enabled : true ,
215269 prompt : `Generate a Google Vault search query based on the user's description.
@@ -226,7 +280,30 @@ For DRIVE corpus, use Drive search operators:
226280- owner:user@example.com - files owned by user
227281- type:document - specific file types
228282
229- For holds, date filtering only works with MAIL and GROUPS corpus.
283+ Return ONLY the search query - no explanations, no quotes, no extra text.` ,
284+ placeholder : 'Describe what content to search for...' ,
285+ } ,
286+ } ,
287+ // Search terms for holds (only works with MAIL and GROUPS corpus)
288+ {
289+ id : 'terms' ,
290+ title : 'Search Terms' ,
291+ type : 'long-input' ,
292+ placeholder : 'Enter search query (e.g., from:user@example.com subject:confidential)' ,
293+ condition : {
294+ field : 'operation' ,
295+ value : 'create_matters_holds' ,
296+ and : { field : 'corpus' , value : [ 'MAIL' , 'GROUPS' ] } ,
297+ } ,
298+ wandConfig : {
299+ enabled : true ,
300+ prompt : `Generate a Google Vault search query based on the user's description.
301+ The query can use Gmail-style search operators:
302+ - from:user@example.com - emails from specific sender
303+ - to:user@example.com - emails to specific recipient
304+ - subject:keyword - emails with keyword in subject
305+ - has:attachment - emails with attachments
306+ - filename:pdf - emails with PDF attachments
230307
231308Return ONLY the search query - no explanations, no quotes, no extra text.` ,
232309 placeholder : 'Describe what content to search for...' ,
0 commit comments