Skip to content

Commit 0555a7e

Browse files
committed
Re-ordered the UI, set AI settings to use system prompt and telemetry
1 parent 75fa671 commit 0555a7e

File tree

2 files changed

+11
-6
lines changed

2 files changed

+11
-6
lines changed

apps/webapp/app/components/runs/v3/RunFilters.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -343,8 +343,8 @@ export function RunsFilters(props: RunFiltersProps) {
343343

344344
return (
345345
<div className="flex flex-row flex-wrap items-center gap-1">
346-
<AIFilterInput />
347346
<FilterMenu {...props} />
347+
<AIFilterInput />
348348
<RootOnlyToggle defaultValue={props.rootOnlyDefault} />
349349
<TimeFilter />
350350
<AppliedFilters {...props} />

apps/webapp/app/v3/services/aiRunFilterService.server.ts

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ export async function processAIFilter(
151151
}),
152152
},
153153
maxSteps: 5,
154-
prompt: `You are an AI assistant that converts natural language descriptions into structured filter parameters for a task run filtering system.
154+
system: `You are an AI assistant that converts natural language descriptions into structured filter parameters for a task run filtering system.
155155
156156
Available filter options:
157157
- statuses: Array of run statuses (PENDING, EXECUTING, COMPLETED_SUCCESSFULLY, COMPLETED_WITH_ERRORS, CANCELED, TIMED_OUT, CRASHED, etc.)
@@ -206,11 +206,16 @@ or if you can't figure out the filters then return:
206206
}
207207
208208
Make the error no more than 8 words.
209-
210-
Convert the following natural language description into structured filters:
211-
212-
"${text}"
213209
`,
210+
prompt: text,
211+
experimental_telemetry: {
212+
isEnabled: true,
213+
metadata: {
214+
environmentId: environment.id,
215+
projectId: environment.projectId,
216+
organizationId: environment.organizationId,
217+
},
218+
},
214219
});
215220

216221
// Add debugging to see what the AI returned

0 commit comments

Comments
 (0)