You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 468fc3f
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: apps/sim/lib/computer-use/repository.integration.ts
+22-1Lines changed: 22 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -54,7 +54,7 @@ describe.skipIf(!connection)('computer use one-shot admission in PostgreSQL', ()
54
54
`CREATE TABLE copilot_runs (id uuid PRIMARY KEY, chat_id uuid NOT NULL, user_id text NOT NULL, status text NOT NULL, tool_admission_closed_at timestamp)`
55
55
)
56
56
awaitconnection.unsafe(
57
-
`CREATE TABLE copilot_async_tool_calls (tool_call_id text PRIMARY KEY, run_id uuid NOT NULL, tool_name text NOT NULL, args jsonb NOT NULL, status text NOT NULL, claimed_by text, claimed_at timestamp, created_at timestamp DEFAULT now(), updated_at timestamp DEFAULT now())`
57
+
`CREATE TABLE copilot_async_tool_calls (tool_call_id text PRIMARY KEY, run_id uuid NOT NULL, tool_name text NOT NULL, args jsonb NOT NULL, status text NOT NULL, claimed_by text, claimed_at timestamp, permission_requested_at timestamp, permission_decision text, created_at timestamp DEFAULT now(), updated_at timestamp DEFAULT now())`
58
58
)
59
59
database.current=drizzle(connection)
60
60
})
@@ -80,6 +80,27 @@ describe.skipIf(!connection)('computer use one-shot admission in PostgreSQL', ()
80
80
awaitrequireConnection()`UPDATE copilot_runs SET tool_admission_closed_at = now()`
'refuses an unapproved action with gate $requested and decision $decision',
89
+
async({ requested, decision })=>{
90
+
awaitrequireConnection()`UPDATE copilot_async_tool_calls SET permission_requested_at = CASE WHEN ${requested} THEN now() ELSE NULL END, permission_decision = ${decision}`
0 commit comments