Skip to content

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.

ActionBest use caseResult
Add SelectionCapture 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 ScriptsCapture 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 ContextSwitch to a different task and remove old context.Removes captured script and snippet context from the current session.

ContextCapture.png

  1. In Script Workspace, ensure the target script is visible.
  2. If you want to limit the scope, select the specific lines you wish to change.
  3. In Genie, click Add Selection.
  4. Confirm the live context badge appears above the composer with the correct script and line info.
  5. Send your prompt in ASK, CODE, QUERY, or DATA.

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.

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 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 x on an attached script badge to detach that context item.

BadgesScripts.png

Clicking a live or attached badge opens a read-only viewer. This view is text-first and matches the Script Viewer format.

PreviewScriptBadge.png

The Metadata Explorer is updated automatically during Add Selection.

GrabScriptDepExtract.png

3. Clear all attached context when changing tasks

Section titled “3. Clear all attached context when changing tasks”

ClearSelection.png

4. Remove one attached item without clearing everything

Section titled “4. Remove one attached item without clearing everything”

RemoveAttachedScripts.png

  • Captured context matches the task scope.
  • Old, unrelated badges are removed.
  • Metadata selection, if needed, matches the same table or field scope.
  • 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.