mirror of
https://github.com/catlog22/Claude-Code-Workflow.git
synced 2026-02-28 09:23:08 +08:00
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:
@@ -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>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -41,7 +41,8 @@ export default defineConfig({
|
||||
strictPort: true,
|
||||
proxy: {
|
||||
// Backend API proxy
|
||||
'/api': {
|
||||
// Use `/api/` (not `/api`) to avoid accidentally proxying frontend routes like `/api-settings`.
|
||||
'/api/': {
|
||||
target: backendHttpTarget,
|
||||
changeOrigin: true,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user