Format string literals to use double quotes
This commit is contained in:
parent
af8fc5ca88
commit
dcc6a89b4d
1 changed files with 8 additions and 8 deletions
|
|
@ -175,17 +175,17 @@ const server = Bun.serve<SessionData>({
|
||||||
|
|
||||||
const promptData = prompt.prompt_json;
|
const promptData = prompt.prompt_json;
|
||||||
if (!promptData || promptData.prompt_type !== "permission") {
|
if (!promptData || promptData.prompt_type !== "permission") {
|
||||||
return new Response("Tab instructions only valid for permission prompts", { status: 400 });
|
return new Response(
|
||||||
|
"Tab instructions only valid for permission prompts",
|
||||||
|
{ status: 400 },
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
const currentOption = promptData.selected_option;
|
const currentOption = promptData.selected_option;
|
||||||
const targetOption = answer.selected_option;
|
const targetOption = answer.selected_option;
|
||||||
|
|
||||||
// Mark as responded in DB first
|
// Mark as responded in DB first
|
||||||
respondToPrompt(
|
respondToPrompt(promptId, `tab:${answer.selected_option}`);
|
||||||
promptId,
|
|
||||||
`tab:${answer.selected_option}`,
|
|
||||||
);
|
|
||||||
|
|
||||||
// Broadcast to dashboards
|
// Broadcast to dashboards
|
||||||
broadcastSSE({
|
broadcastSSE({
|
||||||
|
|
@ -209,18 +209,18 @@ const server = Bun.serve<SessionData>({
|
||||||
|
|
||||||
// Navigate to target option
|
// Navigate to target option
|
||||||
const diff = targetOption - currentOption;
|
const diff = targetOption - currentOption;
|
||||||
const arrow = diff > 0 ? '\x1b[B' : '\x1b[A';
|
const arrow = diff > 0 ? "\x1b[B" : "\x1b[A";
|
||||||
for (let i = 0; i < Math.abs(diff); i++) {
|
for (let i = 0; i < Math.abs(diff); i++) {
|
||||||
sendInput(arrow);
|
sendInput(arrow);
|
||||||
await Bun.sleep(50); // Small delay between arrows
|
await Bun.sleep(50); // Small delay between arrows
|
||||||
}
|
}
|
||||||
|
|
||||||
await Bun.sleep(100);
|
await Bun.sleep(100);
|
||||||
sendInput('\t'); // Tab key
|
sendInput("\t"); // Tab key
|
||||||
|
|
||||||
await Bun.sleep(100);
|
await Bun.sleep(100);
|
||||||
sendInput(answer.instruction); // Instruction text
|
sendInput(answer.instruction); // Instruction text
|
||||||
sendInput('\n'); // Enter key
|
sendInput("\n"); // Enter key
|
||||||
})().catch((err) => {
|
})().catch((err) => {
|
||||||
console.error("Error executing tab instruction sequence:", err);
|
console.error("Error executing tab instruction sequence:", err);
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue