Skip to content

Store tool call ID and infer interception relationships #1334

@dannykopping

Description

@dannykopping

Depends on coder/aibridge#165

Implement the coder/coder aspect of persisting the tool call IDs, and use this to infer relationships between two interceptions. See https://www.notion.so/coderhq/DRAFT-AI-Bridge-Prompt-Provenance-2ccd579be59280f28021d3baf7472fbe?source=copy_link#2ccd579be59280d3923ecfb8e5128dae.

All tool calls triggered by an initial prompt should be linked back to the original (parent) interception.

Acceptance criteria:

  • Migrations to add new columns
  • Proto updated to accept tool call ID in RecordInterceptionEndedRequest
  • aibridgedserver handling of RecordInterceptionEnded to store tool call ID
  • Database query to find other interception with matching tool call ID
  • Database query to update child interception with parent interception ID
  • Tests added

See POC (enterprise/aibridgedserver/aibridgedserver.go -> findInterceptionLineage)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions