feat(server): add regression test for handling empty request bodies

feat(terminal): focus terminal on click
fix(vite): update API proxy path to avoid frontend route conflicts
This commit is contained in:
catlog22
2026-02-25 09:59:54 +08:00
parent 6c16c121d2
commit 45c61186c4
4 changed files with 123 additions and 4 deletions

View File

@@ -107,6 +107,11 @@ export function TerminalInstance({ sessionId, className, onRevealPath }: Termina
const projectPathRef = useRef<string | null>(projectPath);
projectPathRef.current = projectPath;
// Focus terminal when clicked
const handleTerminalClick = useCallback(() => {
xtermRef.current?.focus();
}, []);
const handleArtifactClick = useCallback((path: string) => {
const resolved = resolveArtifactPath(path, projectPathRef.current);
navigator.clipboard.writeText(resolved).catch((err) => {
@@ -313,7 +318,7 @@ export function TerminalInstance({ sessionId, className, onRevealPath }: Termina
))}
</div>
)}
<div ref={terminalHostRef} className="h-full w-full bg-black/90" />
<div ref={terminalHostRef} className="h-full w-full bg-black/90" onClick={handleTerminalClick} />
</div>
);
}