Skip to content

Commit daeb1cb

Browse files
committed
Release v0.0.50
## What's New ### Features - **Automations & Inbox** — New automations and inbox pages (beta — enable in Settings → Beta) - **Open in Editor** — Open worktree workspaces directly in your code editor ### Improvements & Fixes - **Expired Questions UX** — Keep expired AskUserQuestion visible and send answers as messages — thanks @jjjrmy! (#121) - **Default Model Fix** — Fixed chat UI disabled state when creating new chat with wrong default model
1 parent ef7b203 commit daeb1cb

77 files changed

Lines changed: 4882 additions & 191 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

bun.lock

Lines changed: 2 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

bun.lockb

0 Bytes
Binary file not shown.

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "21st-desktop",
3-
"version": "0.0.49",
3+
"version": "0.0.50",
44
"private": true,
55
"description": "1Code - UI for parallel work with AI agents",
66
"author": {
@@ -19,8 +19,8 @@
1919
"dist": "electron-builder",
2020
"dist:manifest": "node scripts/generate-update-manifest.mjs",
2121
"dist:upload": "node scripts/upload-release.mjs",
22-
"claude:download": "node scripts/download-claude-binary.mjs",
23-
"claude:download:all": "node scripts/download-claude-binary.mjs --all",
22+
"claude:download": "node scripts/download-claude-binary.mjs --version=2.1.22",
23+
"claude:download:all": "node scripts/download-claude-binary.mjs --version=2.1.22 --all",
2424
"release": "rm -rf release && bun i && bun run claude:download && bun run build && bun run package:mac && bun run dist:manifest && ./scripts/upload-release-wrangler.sh",
2525
"release:dev": "rm -rf release && bun run claude:download && bun run build && bun run package:mac && rm -rf node_modules && bun i",
2626
"sync:public": "./scripts/sync-to-public.sh",
@@ -33,7 +33,7 @@
3333
},
3434
"dependencies": {
3535
"@ai-sdk/react": "^3.0.14",
36-
"@anthropic-ai/claude-agent-sdk": "^0.2.12",
36+
"@anthropic-ai/claude-agent-sdk": "0.2.22",
3737
"@git-diff-view/react": "^0.0.35",
3838
"@git-diff-view/shiki": "^0.0.36",
3939
"@modelcontextprotocol/sdk": "^1.25.3",

src/main/lib/claude/env.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
1+
import { app } from "electron"
12
import { execSync } from "node:child_process"
23
import fs from "node:fs"
3-
import path from "node:path"
44
import os from "node:os"
5-
import { app } from "electron"
5+
import path from "node:path"
66
import { stripVTControlCharacters } from "node:util"
77
import {
8-
platform,
9-
buildExtendedPath,
108
getDefaultShell,
119
isWindows,
12-
isMacOS,
10+
platform
1311
} from "../platform"
1412

1513
// Cache the shell environment
@@ -215,6 +213,7 @@ export function getClaudeShellEnvironment(): Record<string, string> {
215213
export function buildClaudeEnv(options?: {
216214
ghToken?: string
217215
customEnv?: Record<string, string>
216+
enableTasks?: boolean
218217
}): Record<string, string> {
219218
const env: Record<string, string> = {}
220219

@@ -266,6 +265,8 @@ export function buildClaudeEnv(options?: {
266265

267266
// 5. Mark as SDK entry
268267
env.CLAUDE_CODE_ENTRYPOINT = "sdk-ts"
268+
// Enable/disable task management tools based on user preference (default: enabled)
269+
env.CLAUDE_CODE_ENABLE_TASKS = options?.enableTasks !== false ? "true" : "false"
269270

270271
return env
271272
}

src/main/lib/trpc/routers/claude.ts

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -478,6 +478,7 @@ export const claudeRouter = router({
478478
images: z.array(imageAttachmentSchema).optional(), // Image attachments
479479
historyEnabled: z.boolean().optional(),
480480
offlineModeEnabled: z.boolean().optional(), // Whether offline mode (Ollama) is enabled in settings
481+
enableTasks: z.boolean().optional(), // Enable task management tools (TodoWrite, Task agents)
481482
}),
482483
)
483484
.subscription(({ input }) => {
@@ -739,16 +740,15 @@ export const claudeRouter = router({
739740
}
740741

741742
// Build full environment for Claude SDK (includes HOME, PATH, etc.)
742-
const claudeEnv = buildClaudeEnv(
743-
finalCustomConfig
744-
? {
745-
customEnv: {
746-
ANTHROPIC_AUTH_TOKEN: finalCustomConfig.token,
747-
ANTHROPIC_BASE_URL: finalCustomConfig.baseUrl,
748-
},
749-
}
750-
: undefined,
751-
)
743+
const claudeEnv = buildClaudeEnv({
744+
...(finalCustomConfig && {
745+
customEnv: {
746+
ANTHROPIC_AUTH_TOKEN: finalCustomConfig.token,
747+
ANTHROPIC_BASE_URL: finalCustomConfig.baseUrl,
748+
},
749+
}),
750+
enableTasks: input.enableTasks ?? true,
751+
})
752752

753753
// Debug logging in dev
754754
if (process.env.NODE_ENV !== "production") {

src/main/lib/trpc/routers/external.ts

Lines changed: 50 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,14 @@
1-
import { shell } from "electron";
1+
import { clipboard, shell } from "electron";
22
import { spawn } from "node:child_process";
33
import * as os from "node:os";
44
import * as path from "node:path";
55
import { z } from "zod";
66
import { publicProcedure, router } from "../index";
7+
import {
8+
APP_META,
9+
externalAppSchema,
10+
type ExternalApp,
11+
} from "../../../../shared/external-apps";
712

813
function expandTilde(filePath: string): string {
914
if (filePath.startsWith("~/") || filePath === "~") {
@@ -12,6 +17,31 @@ function expandTilde(filePath: string): string {
1217
return filePath;
1318
}
1419

20+
function spawnAsync(command: string, args: string[]): Promise<void> {
21+
return new Promise((resolve, reject) => {
22+
const child = spawn(command, args, {
23+
detached: true,
24+
stdio: "ignore",
25+
});
26+
child.unref();
27+
child.on("error", reject);
28+
// Resolve immediately — we just need to launch the app
29+
resolve();
30+
});
31+
}
32+
33+
function openPathInApp(app: ExternalApp, targetPath: string): Promise<void> {
34+
const expandedPath = expandTilde(targetPath);
35+
36+
if (app === "finder") {
37+
shell.showItemInFolder(expandedPath);
38+
return Promise.resolve();
39+
}
40+
41+
const meta = APP_META[app];
42+
return spawnAsync("open", ["-a", meta.macAppName, expandedPath]);
43+
}
44+
1545
/**
1646
* External router for shell operations (open in finder, open in editor, etc.)
1747
*/
@@ -24,6 +54,25 @@ export const externalRouter = router({
2454
return { success: true };
2555
}),
2656

57+
openInApp: publicProcedure
58+
.input(
59+
z.object({
60+
path: z.string(),
61+
app: externalAppSchema,
62+
}),
63+
)
64+
.mutation(async ({ input }) => {
65+
await openPathInApp(input.app, input.path);
66+
return { success: true };
67+
}),
68+
69+
copyPath: publicProcedure
70+
.input(z.string())
71+
.mutation(({ input: inputPath }) => {
72+
clipboard.writeText(inputPath);
73+
return { success: true };
74+
}),
75+
2776
openFileInEditor: publicProcedure
2877
.input(
2978
z.object({
Lines changed: 32 additions & 0 deletions
Loading
Lines changed: 19 additions & 0 deletions
Loading

src/renderer/assets/app-icons/cursor.svg

Lines changed: 1 addition & 0 deletions
Loading
Lines changed: 19 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)