Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ cli/
│ ├── commands/ # CLI commands
│ │ ├── auth/ # login, logout, refresh, status, token, whoami
│ │ ├── cli/ # defaults, feedback, fix, setup, upgrade
│ │ ├── conversation/ # list, view (AI conversations)
│ │ ├── dashboard/ # list, view, create, widget (add, edit, delete)
│ │ ├── event/ # list, view
│ │ ├── issue/ # list, view, events, explain, plan, resolve, unresolve, merge
Expand Down
1 change: 1 addition & 0 deletions docs/src/content/docs/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ cli/
│ ├── commands/ # CLI commands
│ │ ├── auth/ # login, logout, refresh, status, token, whoami
│ │ ├── cli/ # defaults, feedback, fix, import, setup, upgrade
│ │ ├── conversation/# list, view
│ │ ├── dashboard/ # list, view, create, add, edit, delete, revisions, restore
│ │ ├── event/ # view, list
│ │ ├── issue/ # list, events, explain, plan, view, resolve, unresolve, archive, merge
Expand Down
33 changes: 33 additions & 0 deletions docs/src/fragments/commands/conversation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@



## Examples

### List conversations

```bash
# List recent AI conversations
sentry conversation list

# Explicit organization
sentry conversation list my-org

# Show more, last 24 hours
sentry conversation list --limit 50 --period 24h

# Filter conversations
sentry conversation list -q "has:errors"

# Paginate through results
sentry conversation list my-org -c next
```

### View a conversation transcript

```bash
# View full transcript
sentry conversation view my-org conv-123

# JSON output
sentry conversation view my-org conv-123 --json
```
9 changes: 9 additions & 0 deletions plugins/sentry-cli/skills/sentry-cli/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -338,6 +338,15 @@ Make an authenticated API request

→ Full flags and examples: `references/api.md`

### Conversation

List and view AI conversations

- `sentry conversation list <org>` — List recent AI conversations
- `sentry conversation view <org> <conversation-id>` — View an AI conversation transcript

→ Full flags and examples: `references/conversation.md`

### CLI

CLI-related commands
Expand Down
82 changes: 82 additions & 0 deletions plugins/sentry-cli/skills/sentry-cli/references/conversation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
---
name: sentry-cli-conversation
version: 0.35.0-dev.0
description: List and view AI conversations
requires:
bins: ["sentry"]
auth: true
---

# Conversation Commands

List and view AI conversations

### `sentry conversation list <org>`

List recent AI conversations

**Flags:**
- `-n, --limit <value> - Number of conversations (1-1000) - (default: "25")`
- `-q, --query <value> - Search query`
- `-t, --period <value> - Time range: "7d", "2026-04-01..2026-05-01", ">=2026-04-01" - (default: "7d")`
- `-f, --fresh - Bypass cache, re-detect projects, and fetch fresh data`
- `-c, --cursor <value> - Navigate pages: "next", "prev", "first" (or raw cursor string)`

**JSON Fields** (use `--json --fields` to select specific fields):

| Field | Type | Description |
|-------|------|-------------|
| `conversationId` | string | |
| `flow` | array | |
| `errors` | number | |
| `llmCalls` | number | |
| `toolCalls` | number | |
| `totalTokens` | number | |
| `totalCost` | number | |
| `startTimestamp` | number | |
| `endTimestamp` | number | |
| `traceCount` | number | |
| `traceIds` | array | |
| `firstInput` | string \| null | |
| `lastOutput` | string \| null | |
| `user` | object \| null | |
| `toolNames` | array | |
| `toolErrors` | number | |

**Examples:**

```bash
# List recent AI conversations
sentry conversation list

# Explicit organization
sentry conversation list my-org

# Show more, last 24 hours
sentry conversation list --limit 50 --period 24h

# Filter conversations
sentry conversation list -q "has:errors"

# Paginate through results
sentry conversation list my-org -c next
```

### `sentry conversation view <org> <conversation-id>`

View an AI conversation transcript

**Flags:**
- `-f, --fresh - Bypass cache, re-detect projects, and fetch fresh data`

**Examples:**

```bash
# View full transcript
sentry conversation view my-org conv-123

# JSON output
sentry conversation view my-org conv-123 --json
```

All commands also support `--json`, `--fields`, `--help`, `--log-level`, and `--verbose` flags.
6 changes: 4 additions & 2 deletions script/generate-sdk.ts
Original file line number Diff line number Diff line change
Expand Up @@ -490,7 +490,8 @@ function renderNamespaceNode(node: NamespaceNode, indent: string): string {
// Render child namespaces
for (const [name, child] of node.children) {
const childBody = renderNamespaceNode(child, `${indent} `);
parts.push(`${indent}${name}: {\n${childBody}\n${indent}},`);
const key = needsQuoting(name) ? `"${name}"` : name;
parts.push(`${indent}${key}: {\n${childBody}\n${indent}},`);
}

return parts.join("\n");
Expand All @@ -508,7 +509,8 @@ function renderNamespaceTypeNode(node: NamespaceNode, indent: string): string {
// Render child namespaces as nested object types
for (const [name, child] of node.children) {
const childBody = renderNamespaceTypeNode(child, `${indent} `);
parts.push(`${indent}${name}: {\n${childBody}\n${indent}};`);
const key = needsQuoting(name) ? `"${name}"` : name;
parts.push(`${indent}${key}: {\n${childBody}\n${indent}};`);
}

return parts.join("\n");
Expand Down
2 changes: 2 additions & 0 deletions src/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import { apiCommand } from "./commands/api.js";
import { authRoute } from "./commands/auth/index.js";
import { whoamiCommand } from "./commands/auth/whoami.js";
import { cliRoute } from "./commands/cli/index.js";
import { conversationRoute } from "./commands/conversation/index.js";
import { dashboardRoute } from "./commands/dashboard/index.js";
import { listCommand as dashboardListCommand } from "./commands/dashboard/list.js";
import { eventRoute } from "./commands/event/index.js";
Expand Down Expand Up @@ -83,6 +84,7 @@ const PLURAL_TO_SINGULAR: Record<string, string> = {
/** Top-level route map containing all CLI commands */
export const routes = buildRouteMap({
routes: {
conversation: conversationRoute,
help: helpCommand,
auth: authRoute,
cli: cliRoute,
Expand Down
26 changes: 26 additions & 0 deletions src/commands/conversation/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
/**
* sentry conversation
*
* List and view AI conversations from Sentry Explore.
*/

import { buildRouteMap } from "../../lib/route-map.js";
import { listCommand } from "./list.js";
import { viewCommand } from "./view.js";

export const conversationRoute = buildRouteMap({
routes: {
list: listCommand,
view: viewCommand,
},
defaultCommand: "list",
docs: {
brief: "List and view AI conversations",
fullDescription:
"List and view AI conversations from Sentry Explore.\n\n" +
"Commands:\n" +
" list List recent AI conversations\n" +
" view View a conversation transcript\n",
hideRoute: {},
},
});
Loading
Loading