Skip to content

YC (S26) | Open Computer History | Continuously record your company computer work, map your workflows, help you find work worth automating, and power your agents' context

fix(chat): keep steer shortcut single-flight (#5585)

Louis Beaumont78956ea1db48
diff --git a/apps/screenpipe-app-tauri/components/chat/standalone/hooks/use-chat-composer-shell.ts b/apps/screenpipe-app-tauri/components/chat/standalone/hooks/use-chat-composer-shell.ts
index f7ec0de98..feed4e281 100644
--- a/apps/screenpipe-app-tauri/components/chat/standalone/hooks/use-chat-composer-shell.ts
+++ b/apps/screenpipe-app-tauri/components/chat/standalone/hooks/use-chat-composer-shell.ts
@@ -234,7 +234,7 @@ export function useChatComposerShellActions({
const handleSteerShortcut = useCallback(() => {
if ((input.trim() || pastedImages.length > 0) && !steerShortcutInFlightRef.current) {
steerShortcutInFlightRef.current = true;
- void Promise.resolve(steerMessage(input.trim())).finally(() => {
+ void steerMessage(input.trim()).finally(() => {
steerShortcutInFlightRef.current = false;
});
return;
@@ -248,7 +248,7 @@ export function useChatComposerShellActions({
!steerShortcutInFlightRef.current
) {
steerShortcutInFlightRef.current = true;
- void Promise.resolve(steerQueuedPrompt(queuedPrompts[0])).finally(() => {
+ void steerQueuedPrompt(queuedPrompts[0]).finally(() => {
steerShortcutInFlightRef.current = false;
});
}
diff --git a/apps/screenpipe-app-tauri/components/chat/standalone/hooks/use-pi-steering-transport.ts b/apps/screenpipe-app-tauri/components/chat/standalone/hooks/use-pi-steering-transport.ts
index 99b61f72b..963b67320 100644
--- a/apps/screenpipe-app-tauri/components/chat/standalone/hooks/use-pi-steering-transport.ts
+++ b/apps/screenpipe-app-tauri/components/chat/standalone/hooks/use-pi-steering-transport.ts
@@ -453,7 +453,7 @@ export function usePiSteeringTransport(
const interruptedAssistantId =
latest.interruptedAssistantId ?? null;
- void commands
+ await commands
.piSteer(
sid,
prompt,