mirror of
https://github.com/claude-code-best/claude-code.git
synced 2026-06-18 14:25:51 +00:00
feat: integrate 5 feature branches, upstream fixes, and MIME detection fix
Squashed 5 commits: Features (from 5 feature branches): - MCP fix, pipe mute, stub recovery - KAIROS activation, openclaw autonomy - Daemon/job command hierarchy + cross-platform bg engine Upstream fixes: - fix: Bun.hash compatibility - chore: chrome dependency update - docs: browser support guide MIME detection fix: - Screenshot detectMimeFromBase64(): decode raw bytes from base64 instead of broken charCodeAt comparison - Fixes API 400 on Windows (JPEG) and macOS (PNG) screenshots
This commit is contained in:
@@ -1,15 +1,13 @@
|
||||
import { mkdtemp, rm, writeFile, mkdir } from "node:fs/promises";
|
||||
import { tmpdir } from "node:os";
|
||||
import { join } from "node:path";
|
||||
import { mkdtemp, rm, writeFile, mkdir } from 'node:fs/promises'
|
||||
import { tmpdir } from 'node:os'
|
||||
import { dirname, join } from 'node:path'
|
||||
|
||||
export async function createTempDir(
|
||||
prefix = "claude-test-",
|
||||
): Promise<string> {
|
||||
return mkdtemp(join(tmpdir(), prefix));
|
||||
export async function createTempDir(prefix = 'claude-test-'): Promise<string> {
|
||||
return mkdtemp(join(tmpdir(), prefix))
|
||||
}
|
||||
|
||||
export async function cleanupTempDir(dir: string): Promise<void> {
|
||||
await rm(dir, { recursive: true, force: true });
|
||||
await rm(dir, { recursive: true, force: true })
|
||||
}
|
||||
|
||||
export async function writeTempFile(
|
||||
@@ -17,16 +15,18 @@ export async function writeTempFile(
|
||||
name: string,
|
||||
content: string,
|
||||
): Promise<string> {
|
||||
const path = join(dir, name);
|
||||
await writeFile(path, content, "utf-8");
|
||||
return path;
|
||||
const path = join(dir, name)
|
||||
const parentDir = dirname(path)
|
||||
await mkdir(parentDir, { recursive: true })
|
||||
await writeFile(path, content, 'utf-8')
|
||||
return path
|
||||
}
|
||||
|
||||
export async function createTempSubdir(
|
||||
dir: string,
|
||||
name: string,
|
||||
): Promise<string> {
|
||||
const path = join(dir, name);
|
||||
await mkdir(path, { recursive: true });
|
||||
return path;
|
||||
const path = join(dir, name)
|
||||
await mkdir(path, { recursive: true })
|
||||
return path
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user