Loading Accelerated Logic…
GA Release

The Multi-Agent WebGPU Engine & Interactions API are now generally available.

Part 5: Composer, Files & Context Mastery

How to make AI actually understand your project with 3-layer context, staged attachments, and smart snippets.

Category: Getting Started • Read Time: 23 min read • Updated: 2026-11-10

1. The Chat Is NOT Just a Chat — It's a Context Engine

New users think: type question -> get answer.

Power users know: the AI's answer quality is 90% determined by what context you provide before sending a prompt. In Accelerated Logic AI, three distinct layers of context stack together:

Layer 1: Persistent Context

Folder Memory instructions and Pinned Files that apply to every single message in that thread or folder.

Layer 2: Staged Context

Temporary images, audio, code files, or documents attached specifically to your current message turn.

Layer 3: The Prompt

Your specific task instruction, question, or enhancement request written in the composer textarea.

2. Thread Management — Before You Even Type

  • New Chat & Auto-Titling: Sidebar New Chat creates a blank thread. It automatically auto-titles based on your first prompt after the assistant answers, or double-click to rename manually.
  • Full-Text Thread Search: Use the search bar at top of sidebar to query message content across all past threads instantly.
  • Pinned Chats & Folders: Hover over any chat to click the pin icon. Create custom folders with Folder Memory (e.g., "We use React + Tailwind, no class components"). All chats inside that folder automatically inherit those rules.
  • Forking Conversations: Hover under any user or assistant message and click Fork. This branches the conversation from that exact message into a new thread without modifying original history.

3. The Composer — Deep Dive

Composer Toolbar & Input Controls:
  • Active Skills & Personas Bar: Active skills display as blue chips; personas as indigo chips. Click the X on any chip to disable immediately.
  • Project Context Bar: Shows pinned files attached to this chat session. Click chips to preview or unpin.
  • Staged Media Assets (72x72 Cards): Dragged files, screenshots, or pasted images appear inside the composer as temporary cards prior to sending.
  • Enhance Prompt (Wand): Expands brief prompts into detailed, structured prompts using AI.
  • Queue Response & Stop: While the assistant streams, type your next prompt and click Queue Response (indigo) to auto-send upon completion.

4. File Upload — 6 Methods & All Supported Types

Upload Methods
  • Plus button file picker
  • Global window drag overlay
  • Composer-specific drop zone
  • Sidebar file drag to composer
  • Clipboard Paste (Ctrl+V screenshots, URLs)
  • ZIP archive auto-unzip import
File Types & Processing
  • Images: Vision queue (SVG sent as code text)
  • PDFs: Auto-extracts plain text with page markers
  • Videos: Inline video data (~560 tokens)
  • Code/Text: Context-optimized if >5000 chars

5. Pinned vs Staged — When to Use Which

Use Staged (Temporary) For:
  • One-off UI screenshot reviews
  • Comparing two image attachments
  • Quick questions about a log snippet without cluttering context permanently
Use Pinned (Persistent) For:
  • Core schema files (types.ts, package.json)
  • Project architecture rules and API documentation
  • Active code files being iteratively edited across multiple turns

6. How the App Saves Tokens — Relevant Snippets

When large text or code files (>5000 characters) are attached, Accelerated Logic AI automatically optimizes context window usage:

  • Splits file into 15-line chunks with 4-line overlapping boundaries.
  • Scores chunks against key terms in your prompt.
  • Selects highest-scoring chunks up to 5,000 characters.
  • Annotates output: [CONTEXT OPTIMIZED: Showing only relevant sections based on your query].

7. Prompting Patterns That Work Best

Security Audit:

"Stage server.ts + prompt: Review for CORS and authentication vulnerabilities."

UI Cloning:

"Upload UI screenshot + prompt: Clone this exact dashboard component in React + Tailwind."

8. Token & Context Window UI Indicators

Monitor response telemetry under assistant messages:

TPS Badge: Displays Tokens Per Second generation throughput (~15–40 local, ~150–300 cloud).

Context % Indicator: Hover over the Context % badge to see exact token counts (e.g. 12,450 / 128,000 tokens used). When context reaches 90%+, start a New Chat inside the same folder to preserve Folder Memory while resetting token load.

9. Hardening & Edge Cases

Q:
File upload error (>5MB)

For large repositories, use ZIP import or GitHub repository import (covered in Part 17).

Q:
SVG images not rendering thumbnail

SVGs are deliberately parsed as clean source text so text-only AI models can analyze the raw XML vector markup directly.

10. Inside the File Pipeline: What Actually Happens to Your Upload

Every attachment flows through the same four stages. Knowing the stages tells you where to intervene when something looks wrong:

  1. Ingest. The file is read in the browser — nothing is uploaded to a server for processing. Text-like files are decoded as UTF-8 text; PDFs are run through a text extractor with page markers preserved; images are kept as binary for vision models (or decoded as text when the SVG exception applies); ZIP archives are decompressed in-browser and their inner files are surfaced as individual staged items.
  2. Index. The extracted text is split into overlapping line-window chunks and scored against the terms in your prompt — the relevant-snippet optimizer described in Section 6. Files under ~5,000 characters skip optimization entirely and are sent whole.
  3. Attach. The resulting payload is stamped into the outgoing message. Pinned files are re-attached on every turn; staged files attach once and are dropped afterward.
  4. Attribute. The model sees the file content plus (for optimized files) a context-optimization annotation telling it the text was excerpt-selected — which is why asking "does the attached file contain X?" about an optimized attachment can get a false negative; the chunk containing X may have been scored out.

Practical consequence: for targeted questions about a huge file, put the discriminating keyword in your prompt ("does server.ts validate the OAuth state parameter?") — the optimizer will keep the chunks containing those terms instead of a random 5k excerpt.

11. Working Long Documents & Big Codebases — Strategies That Beat the Limit

For long prose (specs, papers, books)
  • Ask for a structural pass first: "List the section headings and a one-line summary of each." Then interrogate specific sections by name.
  • One question per turn against an optimized attachment — shotgun questions get partial coverage by design.
  • If you need total recall, work through the document in slices (chapter by chapter) rather than one mega-prompt.
For codebases (multi-file)
  • Stage the two or three files the question is actually about — not the whole tree.
  • Name symbols in your prompt (validateToken) so the chunk scorer keeps the right regions.
  • For architecture questions, pin the manifest (package.json, tsconfig.json) and the entry file, and ask for a dependency walk-through.
  • For sweeping refactors, move into the GitHub workspace / Web Sandbox where multi-file editing is first-class instead of chatting file-by-file.

ZIP import (Part 17 covers exporting) is the escape hatch when a "whole project" paste would drown the context window — import it, then pin only the files relevant to the current task.

12. Vision Attachments — When Images Actually Reach the Model

Image handling differs per model, and the app degrades gracefully — mostly quietly:

  • Vision-capable equipped model: images are included in the request as vision payloads. Screenshot review, diagram reading, and UI cloning all work.
  • Text-only equipped model: image attachments are skipped automatically and a note appears in the run's activity/thinking trace telling you the images were omitted — do not assume the model "saw" them.
  • Mixed requests: text and images travel together; if the model is vision-capable nothing extra is needed. If you need guaranteed vision, equip a model with the 👁️ Visual badge (Part 2).
  • Animated GIFs / videos: inline video data is tokenized approximately (short clips only); long videos are better handled by noting timestamps for Transcribe (Part 21) instead of attaching raw video.
  • PDFs with diagrams: text is extracted, images inside the PDF are not interpreted as vision input — screenshot the figure itself and attach the image if you need the model to reason about the visual.

13. Clipboard & Paste Workflows That Save Minutes Every Day

Screenshot → prompt (2 keys)

Win+Shift+S / Ctrl+Cmd+Shift+4, then Ctrl/Cmd+V straight into the composer. No saving files, no dragging.

URL → context

Paste a URL alone and pair with "fetch this and summarize the API surface" — the model uses the web-fetch tool (Part 13) instead of guessing from the link text.

CSV → instant analysis

Paste raw CSV from your clipboard and ask for "a pandas summary: dtypes, nulls, and a histogram of the price column" — the Python Playground (Part 10) can execute it inline and render the plot.