feat: improve UI/UX with volume meter and refine input area styling
- Add VolumeMeter component for realtime audio visualization - Refactor input area to show volume meter in realtime mode - Update button styling and layout for cleaner interface - Improve text input integration with better visual hierarchy - Add volume state tracking to Speechmatics audio hook - Add agent working directory validation on creation - Update agent prompt with better orchestration guidelines Generated with [Claude Code](https://claude.ai/code) via [Happy](https://happy.engineering) Co-Authored-By: Claude <noreply@anthropic.com> Co-Authored-By: Happy <yesreply@happy.engineering>
This commit is contained in:
co-authored by
Claude
Happy
parent
de5aba4186
commit
e1e14b1473
@@ -166,6 +166,16 @@ describe("AgentManager", () => {
|
||||
// ==========================================================================
|
||||
|
||||
describe("Agent Creation and Directory Control", () => {
|
||||
it("should reject creation when working directory does not exist", async () => {
|
||||
const nonExistentDir = join(tmpDir, "does-not-exist");
|
||||
|
||||
await expect(
|
||||
manager.createAgent({
|
||||
cwd: nonExistentDir,
|
||||
})
|
||||
).rejects.toThrow(/Working directory does not exist or is not accessible/);
|
||||
});
|
||||
|
||||
it(
|
||||
"should create agent and run in specified directory",
|
||||
async () => {
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import { spawn, ChildProcess } from "child_process";
|
||||
import { Writable, Readable } from "stream";
|
||||
import { access, constants } from "fs/promises";
|
||||
import {
|
||||
ClientSideConnection,
|
||||
ndJsonStream,
|
||||
@@ -102,6 +103,15 @@ export class AgentManager {
|
||||
const agentId = uuidv4();
|
||||
const cwd = options.cwd;
|
||||
|
||||
// Validate that the working directory exists
|
||||
try {
|
||||
await access(cwd, constants.R_OK | constants.X_OK);
|
||||
} catch (error) {
|
||||
throw new Error(
|
||||
`Working directory does not exist or is not accessible: ${cwd}`
|
||||
);
|
||||
}
|
||||
|
||||
// Spawn the ACP process
|
||||
const agentProcess = spawn("npx", ["@zed-industries/claude-code-acp"], {
|
||||
stdio: ["pipe", "pipe", "pipe"],
|
||||
|
||||
Reference in New Issue
Block a user