MCPcopy
hub / github.com/openai/plugins / cancel_diff_resolution

Function cancel_diff_resolution

plugins/codex-security/scripts/workbench_db.py:1396–1411  ·  view source on GitHub ↗
(
    connection: sqlite3.Connection, args: argparse.Namespace
)

Source from the content-addressed store, hash-verified

1394
1395
1396def cancel_diff_resolution(
1397 connection: sqlite3.Connection, args: argparse.Namespace
1398) -> dict[str, Any]:
1399 workspace = require_workspace(connection, args.workspace_id)
1400 request_id = require_uuid(args.request_id, "request-id")
1401 timestamp = now()
1402 with connection:
1403 connection.execute(
1404 """
1405 UPDATE workspaces
1406 SET diff_resolution_id = NULL, updated_at = ?
1407 WHERE id = ? AND diff_resolution_id = ?
1408 """,
1409 (timestamp, workspace["id"], request_id),
1410 )
1411 return workspace_state(connection, workspace["id"])
1412
1413
1414def set_diff_target(connection: sqlite3.Connection, args: argparse.Namespace) -> dict[str, Any]:

Callers 1

mainFunction · 0.85

Calls 4

require_uuidFunction · 0.90
require_workspaceFunction · 0.85
nowFunction · 0.85
workspace_stateFunction · 0.85

Tested by

no test coverage detected