A text editor for building reusable LLM prompt context with a two-pane interface.
- Document Tree Management: Organize documents into groups with hierarchical structure
- Real-time Editing: Edit documents with auto-save functionality
- Selection System: Select groups and documents with cascading selection
- Context Assembly: Copy selected content with proper formatting
- Token Counting: Live token estimation for selected content
- Persistent Storage: All data saved to localStorage automatically
- Open
index.html
in your web browser - Create groups and documents using the "+" buttons
- Select items using checkboxes (group selection cascades to documents)
- Edit documents by clicking on them in the left pane
- Use "Copy Context" to copy selected content to clipboard
- Use "Empty Context" to deselect all items
The application stores data in localStorage with the following structure:
interface ContextStore {
groups: Group[];
}
interface Group {
id: string;
name: string;
documents: Document[];
selected: boolean;
collapsed: boolean;
createdAt: Date;
updatedAt: Date;
}
interface Document {
id: string;
name: string;
content: string;
selected: boolean;
createdAt: Date;
updatedAt: Date;
}
When copying context, the format is:
# Group Name
## Document Name
{content}
# Another Group
## Another Document
{content}
- Built with React 18 and TypeScript
- Styled with Tailwind CSS
- Uses Lucide React icons
- Fully self-contained in a single HTML file
- No build process required
- Works offline
- Modern browsers with ES6+ support
- Requires localStorage support
- Requires Clipboard API for copy functionality