Context Capture (Scripts and Selections)
Context quality directly affects response quality. Use capture tools to give Genie the right scope before you send a prompt.
Capture actions
Section titled “Capture actions”| Action | Best use case | Result |
|---|---|---|
| Add Selection | Capture the active Script Workspace selection, or the current script when no multi-line range is selected. | Updates the live Script Workspace context and related metadata for the current chat. |
| Add Scripts | Capture script objects from all open Script Workspace tabs. | Attaches each open script as its own badge so Genie can reason over broader multi-script context. |
| Clear Context | Switch to a different task and remove old context. | Removes captured script and snippet context from the current session. |

Recommended flow for live context
Section titled “Recommended flow for live context”- In Script Workspace, ensure the target script is visible.
- If you want to limit the scope, select the specific lines you wish to change.
- In Genie, click Add Selection.
- Confirm the live context badge appears above the composer with the correct script and line info.
- Send your prompt in ASK, CODE, QUERY, or DATA.
Scope detection logic for Add Selection
Section titled “Scope detection logic for Add Selection”Genie automatically decides the live capture scope based on your Script Workspace selection:
- Explicit multi-row selection: Captures only the selected range.
- Zero or one selected row: Captures the entire script.
- Metadata extraction: A selection capture also updates related table, field, and layout metadata.
Add Selection can also refresh the active project’s reusable cache. That project cache remains separate from the current chat session, so clearing session context does not erase the project’s saved rules or project-level history.
Multi-script capture with Add Scripts
Section titled “Multi-script capture with Add Scripts”Use Add Scripts when you want Genie to see multiple open Script Workspace tabs as attached script objects instead of one live selection.
- Each captured tab appears as its own attached script badge.
- Attached script badges remain separate so Genie can reason about related scripts together.
- Multi-script attached context is different from the live Script Workspace badge; it represents explicit attached scripts rather than the current live selection.
- Use Add Selection when the current live script or selected lines should stay primary. Use Add Scripts when surrounding or related scripts matter more than one live selection.
Context badges
Section titled “Context badges”Context appears above the composer in two ways:
- Live context badge: Shows the current Script Workspace script or selection captured with Add Selection.
- Attached script badges: Show scripts attached with Add Scripts.
For most workflows, use Add Selection for the live script or highlighted lines, Add Scripts when several open tabs matter together, and Clear Context when you want to detach captured scope for this chat.
For either badge type:
- Preview: Click a badge to open the read-only viewer and inspect the captured text.
- Remove: Click
xon an attached script badge to detach that context item.

Visual walkthrough
Section titled “Visual walkthrough”1. Preview captured script text
Section titled “1. Preview captured script text”Clicking a live or attached badge opens a read-only viewer. This view is text-first and matches the Script Viewer format.

2. Inspect metadata projection
Section titled “2. Inspect metadata projection”The Metadata Explorer is updated automatically during Add Selection.

3. Clear all attached context when changing tasks
Section titled “3. Clear all attached context when changing tasks”
4. Remove one attached item without clearing everything
Section titled “4. Remove one attached item without clearing everything”
Pre-send checklist
Section titled “Pre-send checklist”- Captured context matches the task scope.
- Old, unrelated badges are removed.
- Metadata selection, if needed, matches the same table or field scope.
Quick recovery logic
Section titled “Quick recovery logic”- If capture fails, click Script Workspace and run one manual
Cmd+C, then retry. - If Genie is minimized, restore it from Dock or menu bar first. See Mac Menu Bar and Dock Access.
- If results are too generic, attach more surrounding logic by clearing your selection in Script Workspace and clicking Add Selection.
- If results are too broad, select a smaller range in Script Workspace and click Add Selection.
- If you need Genie to compare or edit multiple open scripts together, use Add Scripts instead of relying on one live selection.