Added comprehensive Talon list search functionality to the VS Code extension, similar to the web interface shown in the screenshot. The extension now supports searching both Talon commands and Talon lists in separate tabs.
- File:
src/parser/talonListParser.ts - Parses
.talon-listfiles with format:spoken_form: list_value - Supports CSV-style parsing for bulk imports
- Extracts list names from file paths
- Handles field length truncation (spoken form: 100 chars, list value: 700 chars)
- File:
src/database/dataManager.ts - Added list storage alongside commands
- Methods for inserting, searching, and managing list items
- Supports batch operations for performance
- List search across list name, spoken form, list value, and source file
- Files:
webview/search.js,webview/styles.css,src/extension.ts - Added tabs for "Commands" and "Lists"
- Separate search interfaces for each type
- Independent filtering and display
- Search Box: Search across all list fields (name, spoken form, value, source file)
- Grouped Results: Results grouped by list name for better organization
- Table Display: Clean table format showing:
- Spoken Form (what you say)
- List Value (what gets inserted)
- Source File (clickable to open file)
- Statistics: Shows total list items and available list names
- File:
src/extension.ts - Updated
importTalonFiles()to scan for both.talonand.talon-listfiles - Imports both commands and lists in a single operation
- Progress reporting includes both file types
- Database refresh clears and reloads both commands and lists
Created test data in test-data/user/:
emoji.talon-list- Emoji mappings (angry: 😠, happy: 😊, etc.)keys.talon-list- Key mappings (left: left, up: up, etc.)snippets.talon-list- Code snippetsvscode.talon- Sample commands that reference the lists
- Open Command Palette (
Ctrl+Shift+P) - Run "Talon: Set User Folder"
- Select the
test-datafolder (or your actual Talon user folder) - Run "Talon: Refresh Index"
- Open Command Palette and run "Talon: Search Commands"
- Click the "Lists" tab
- Type in the search box to find list items
- Click on source files to open them
- Results are grouped by list name for easy browsing
- Stay on the "Commands" tab
- Use the existing search functionality
- Commands referencing lists (like
{user.emoji}) will show up
interface TalonListItem {
id: number;
listName: string; // e.g., "user.emoji"
spokenForm: string; // e.g., "angry"
listValue: string; // e.g., "😠"
sourceFile?: string; // Path to .talon-list file
createdAt?: string;
importedAt?: string;
}- List Search: Searches across listName, spokenForm, listValue, and sourceFile
- Case Insensitive: All searches are case-insensitive
- Partial Matching: Finds partial matches in any field
- Grouped Display: Results grouped by list name for better organization
-
Standard .talon-list files:
spoken_form: list_value another_form: another_value -
CSV format (for bulk imports):
listName,spokenForm,listValue user.emoji,angry,😠 user.emoji,happy,😊
- Batch imports for large list files
- Chunked loading for UI responsiveness
- Separate storage and search for commands vs lists
- Indexed search across all list fields
- List-aware command search: Show which commands use specific lists
- List value preview: Show first few values when browsing list names
- Export functionality: Export lists to CSV or other formats
- List editing: Inline editing of list items
- List statistics: Show usage statistics per list
Use the provided test data:
- Import from
test-datafolder - Should import 3 list files with ~45 total list items
- Test searching for "angry", "key", "print", etc.
- Test clicking on source files to open them
- Verify both tabs work independently
The feature is now fully integrated and provides a comprehensive list search experience similar to the web interface shown in the screenshot.