claude-ws 0.1.10 → 0.1.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-ws",
3
- "version": "0.1.10",
3
+ "version": "0.1.12",
4
4
  "private": false,
5
5
  "description": "A beautifully crafted workspace interface for Claude Code with real-time streaming and local SQLite database",
6
6
  "keywords": [
@@ -96,6 +96,7 @@
96
96
  "@radix-ui/react-dropdown-menu": "^2.1.16",
97
97
  "@radix-ui/react-label": "^2.1.8",
98
98
  "@radix-ui/react-scroll-area": "^1.2.10",
99
+ "@radix-ui/react-select": "^2.2.6",
99
100
  "@radix-ui/react-separator": "^1.1.8",
100
101
  "@radix-ui/react-slot": "^1.2.4",
101
102
  "@radix-ui/react-tabs": "^1.1.13",
@@ -127,11 +128,13 @@
127
128
  "tailwind-merge": "^3.4.0",
128
129
  "tar": "^7.5.2",
129
130
  "tsx": "^4.21.0",
131
+ "typescript": "^5",
130
132
  "vscode-icons-js": "^11.6.1",
131
- "zustand": "^5.0.9"
133
+ "zustand": "^5.0.9",
134
+ "@tailwindcss/postcss": "^4",
135
+ "tailwindcss": "^4"
132
136
  },
133
137
  "devDependencies": {
134
- "@tailwindcss/postcss": "^4",
135
138
  "@types/adm-zip": "^0.5.7",
136
139
  "@types/better-sqlite3": "^7.6.13",
137
140
  "@types/node": "^20",
@@ -140,9 +143,7 @@
140
143
  "drizzle-kit": "^0.31.8",
141
144
  "eslint": "^9",
142
145
  "eslint-config-next": "^16.1.3",
143
- "tailwindcss": "^4",
144
- "tw-animate-css": "^1.4.0",
145
- "typescript": "^5"
146
+ "tw-animate-css": "^1.4.0"
146
147
  },
147
148
  "packageManager": "pnpm@10.28.0+sha512.05df71d1421f21399e053fde567cea34d446fa02c76571441bfc1c7956e98e363088982d940465fd34480d4d90a0668bc12362f8aa88000a64e83d0b0e47be48"
148
- }
149
+ }
package/server.ts CHANGED
@@ -154,14 +154,17 @@ app.prepare().then(async () => {
154
154
  // Cancel/kill attempt
155
155
  socket.on('attempt:cancel', async (data: { attemptId: string }) => {
156
156
  const { attemptId } = data;
157
- const cancelled = agentManager.cancel(attemptId);
158
157
 
159
- if (cancelled) {
160
- // Get attempt to retrieve taskId for global event
161
- const attempt = await db.query.attempts.findFirst({
162
- where: eq(schema.attempts.id, attemptId),
163
- });
158
+ // Try to cancel in-memory agent (may not exist if server restarted)
159
+ agentManager.cancel(attemptId);
160
+
161
+ // Always update DB status - handles both in-memory and stale attempts
162
+ // Get attempt to retrieve taskId for global event
163
+ const attempt = await db.query.attempts.findFirst({
164
+ where: eq(schema.attempts.id, attemptId),
165
+ });
164
166
 
167
+ if (attempt && attempt.status === 'running') {
165
168
  await db
166
169
  .update(schema.attempts)
167
170
  .set({ status: 'cancelled', completedAt: Date.now() })
@@ -177,7 +180,7 @@ app.prepare().then(async () => {
177
180
  });
178
181
 
179
182
  // Global event for all clients to track cancelled tasks
180
- if (attempt?.taskId) {
183
+ if (attempt.taskId) {
181
184
  io.emit('task:finished', { taskId: attempt.taskId, status: 'cancelled' });
182
185
  }
183
186
  }