From a87c4d7fb463ae918cdbdbc3c239824e7d8140aa Mon Sep 17 00:00:00 2001 From: Seth Carlson <66243744+sdcarlson@users.noreply.github.com> Date: Sat, 5 Sep 2026 17:49:03 -0700 Subject: [PATCH 1/2] Add focused research and next-task context to assistant prompts --- app/connections.tsx | 54 ++++++++++++++++++++++++++++++++++++++-- app/workspace.tsx | 1 + lib/assistant-handoff.ts | 18 +++++++++++++- tests/assistant.test.mjs | 25 +++++++++++++++++++ 4 files changed, 95 insertions(+), 3 deletions(-) diff --git a/app/connections.tsx b/app/connections.tsx index 263dfa9..28bcac6 100644 --- a/app/connections.tsx +++ b/app/connections.tsx @@ -62,6 +62,7 @@ export function Connections({ const [workflow, setWorkflow] = useState('research'); const [loading, setLoading] = useState(false); +<<<<<<< HEAD function editorTarget() { return current?.session ? { @@ -102,18 +103,22 @@ export function Connections({ ); } } +======= + const [nextTask, setNextTask] = useState(''); + const [research, setResearch] = useState(''); +>>>>>>> acbc299 (Add focused research and next-task context to assistant prompts) function download(assistant?: Assistant) { if (!current) return; const packet = selectedJobPacket(current, facts, draft); if (assistant) { try { downloadFile( - assistantPrompt(packet, assistant), + assistantPrompt(packet, assistant, false, { nextTask, research }), `relay-${assistant}-prompt.md`, 'text/markdown', ); setNote( - 'Prompt downloaded. Share it with your chosen assistant, save its JSON response, then load that file here for review. Only this job, the visible draft and supplied facts are included.', + 'Prompt downloaded with this job, visible draft, supplied facts and the task context shown below. Share it with your assistant, then paste or load its JSON response here for review.', ); } catch (error) { setNote( @@ -160,6 +165,7 @@ export function Connections({ +