feat(ai-agent): add local run button#3690
Conversation
- Add `upload` field in `agent.graphql` to support local session resumption - Introduce `AIAgentRunLocalButton` component for running agent sessions locally - Integrate `AIAgentRunLocalButton` into `AIAgentRun` for local session handling
Greptile SummaryThis PR adds a "Run locally" button to the AI agent run detail page, allowing users to resume an agent session from their local terminal using the Plural CLI. The button is gated on
Confidence Score: 5/5Changes are additive and display-only — no mutations, no data model changes on the frontend side, and the button only appears when the server-provided session URL is present. The new component is a modal with static instructional text and a formatted command string derived from an already-fetched runId. The GraphQL fragment change is additive and the generated files are consistent with it. No existing behaviour is altered. No files require special attention.
|
| Filename | Overview |
|---|---|
| assets/src/components/ai/agent-runs/details/AIAgentRunLocalButton.tsx | New component: renders a 'Run locally' button that opens a modal with step-by-step instructions for resuming the agent session via plural agents resume <runId>; straightforward display-only component with no side effects |
| assets/src/components/ai/agent-runs/details/AIAgentRun.tsx | Integrates AIAgentRunLocalButton into the run detail header; button conditionally rendered when run?.upload?.session is truthy |
| assets/src/graph/ai/agent.graphql | Adds upload { id session } to the AgentRunTiny fragment, making the session URL available wherever that fragment is used (queries and subscriptions) |
| assets/src/generated/graphql.ts | Auto-generated GraphQL types and operations updated to include the AgentRunUpload type and upload field on AgentRunTinyFragment |
| assets/src/generated/persisted-queries/client.json | Auto-generated persisted query hashes updated to reflect the new GraphQL fragment shape |
Reviews (1): Last reviewed commit: "feat(ai-agent): add local run button" | Re-trigger Greptile
uploadfield inagent.graphqlto support local session resumptionAIAgentRunLocalButtoncomponent for running agent sessions locallyAIAgentRunLocalButtonintoAIAgentRunfor local session handlingBlocked by pluralsh/plural-cli#760
Test Plan
Test environment: https://console.plrl-dev-aws.onplural.sh/
Checklist
Plural Flow: console