mirror of
https://github.com/AutoMaker-Org/automaker.git
synced 2026-02-02 08:33:36 +00:00
Merge remote-tracking branch 'origin/main' into implement-planning/speckits
This commit is contained in:
@@ -7,6 +7,7 @@ import { getElectronAPI } from "@/lib/electron";
|
||||
interface UseElectronAgentOptions {
|
||||
sessionId: string;
|
||||
workingDirectory?: string;
|
||||
model?: string;
|
||||
onToolUse?: (toolName: string, toolInput: unknown) => void;
|
||||
}
|
||||
|
||||
@@ -33,6 +34,7 @@ interface UseElectronAgentResult {
|
||||
export function useElectronAgent({
|
||||
sessionId,
|
||||
workingDirectory,
|
||||
model,
|
||||
onToolUse,
|
||||
}: UseElectronAgentOptions): UseElectronAgentResult {
|
||||
const [messages, setMessages] = useState<Message[]>([]);
|
||||
@@ -88,7 +90,8 @@ export function useElectronAgent({
|
||||
sessionId,
|
||||
content,
|
||||
workingDirectory,
|
||||
imagePaths
|
||||
imagePaths,
|
||||
model
|
||||
);
|
||||
|
||||
if (!result.success) {
|
||||
@@ -104,7 +107,7 @@ export function useElectronAgent({
|
||||
throw err;
|
||||
}
|
||||
},
|
||||
[sessionId, workingDirectory, isProcessing]
|
||||
[sessionId, workingDirectory, model, isProcessing]
|
||||
);
|
||||
|
||||
// Message queue for queuing messages when agent is busy
|
||||
@@ -344,7 +347,8 @@ export function useElectronAgent({
|
||||
sessionId,
|
||||
content,
|
||||
workingDirectory,
|
||||
imagePaths
|
||||
imagePaths,
|
||||
model
|
||||
);
|
||||
|
||||
if (!result.success) {
|
||||
@@ -359,7 +363,7 @@ export function useElectronAgent({
|
||||
setIsProcessing(false);
|
||||
}
|
||||
},
|
||||
[sessionId, workingDirectory, isProcessing]
|
||||
[sessionId, workingDirectory, model, isProcessing]
|
||||
);
|
||||
|
||||
// Stop current execution
|
||||
|
||||
@@ -68,6 +68,13 @@ function isInputFocused(): boolean {
|
||||
return true;
|
||||
}
|
||||
|
||||
// Check for any open dropdown menus (Radix UI uses role="menu")
|
||||
// This prevents shortcuts from firing when user is typing in dropdown filters
|
||||
const dropdownMenu = document.querySelector('[role="menu"]');
|
||||
if (dropdownMenu) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user