Commit f621834
authored
feat: Auto-generate and edit session display names (#432)
## Summary
Two-part feature for session display name management:
### 1. Auto-Generate Display Names
When users send their first message in a session, the backend
automatically generates a descriptive display name using Claude Haiku.
- Triggers on first user message when `displayName` is empty
- Uses session context (repos, workflow) to generate relevant names
- Runs asynchronously - fails silently with logging on error
- Supports both Anthropic API (via project secret) and Google Vertex AI
### 2. Manual Name Editing
Added UI controls to edit session names:
- "Edit name" option in session detail page kebab menu
- "Edit name" option in sessions list actions dropdown
- Simple modal dialog for editing
### Backend Changes
- Added `handlers/display_name.go` with Claude Haiku integration
- Added `PUT
/api/projects/:projectName/agentic-sessions/:sessionName/displayname`
endpoint
- Modified `PostSessionMessageWS` to trigger auto-generation
- Added Anthropic Go SDK with Vertex AI support
### Frontend Changes
- Added `EditSessionNameDialog` component
- Added `useUpdateSessionDisplayName` React Query mutation
- Added Next.js API proxy route for display name updates
- Updated `session-header.tsx` and `sessions-section.tsx` with edit
buttons
### Testing
- Tested manual name editing via UI
- Verified backend deployment with Vertex AI authentication fix1 parent afe930e commit f621834
File tree
12 files changed
+937
-31
lines changed- components
- backend
- handlers
- websocket
- frontend/src
- app
- api/projects/[name]/agentic-sessions/[sessionName]/displayname
- projects/[name]/sessions/[sessionName]
- components
- workspace-sections
- services
- api
- queries
12 files changed
+937
-31
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
| |||
18 | 19 | | |
19 | 20 | | |
20 | 21 | | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
21 | 25 | | |
22 | 26 | | |
23 | 27 | | |
24 | 28 | | |
25 | 29 | | |
| 30 | + | |
26 | 31 | | |
27 | 32 | | |
28 | 33 | | |
29 | 34 | | |
| 35 | + | |
30 | 36 | | |
31 | 37 | | |
32 | 38 | | |
| |||
35 | 41 | | |
36 | 42 | | |
37 | 43 | | |
| 44 | + | |
| 45 | + | |
38 | 46 | | |
| 47 | + | |
| 48 | + | |
39 | 49 | | |
40 | 50 | | |
41 | 51 | | |
| |||
49 | 59 | | |
50 | 60 | | |
51 | 61 | | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
52 | 66 | | |
53 | 67 | | |
54 | 68 | | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
55 | 75 | | |
56 | 76 | | |
57 | 77 | | |
58 | 78 | | |
59 | 79 | | |
60 | 80 | | |
| 81 | + | |
61 | 82 | | |
62 | 83 | | |
63 | 84 | | |
64 | 85 | | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
65 | 89 | | |
66 | 90 | | |
67 | 91 | | |
| |||
Large diffs are not rendered by default.
0 commit comments