Add snippet/command library with CRUD and send-to-session
Full command snippet library for saving and sending reusable commands: Backend: - SQLite migration 003 creates snippets table - Snippet model with name, command, description, folder, tags - Store CRUD methods and API endpoints Frontend: - SnippetLibrary class with searchable list + detail/editor split view - Create, edit, delete snippets in modal dialog - 'Send to Session' button writes command to active terminal - 'Send Snippet' option in terminal right-click context menu - Ctrl+Shift+S keyboard shortcut to open library
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
-- Migration 003: Add snippets table for the command snippet library.
|
||||
-- Stores reusable commands that can be sent to active sessions.
|
||||
|
||||
CREATE TABLE IF NOT EXISTS snippets (
|
||||
id TEXT PRIMARY KEY,
|
||||
name TEXT NOT NULL,
|
||||
command TEXT NOT NULL,
|
||||
description TEXT NOT NULL DEFAULT '',
|
||||
folder TEXT NOT NULL DEFAULT '',
|
||||
tags TEXT NOT NULL DEFAULT '[]',
|
||||
created_at TEXT NOT NULL DEFAULT (datetime('now')),
|
||||
updated_at TEXT NOT NULL DEFAULT (datetime('now'))
|
||||
);
|
||||
|
||||
INSERT INTO schema_version (version, applied_at) VALUES (3, datetime('now'));
|
||||
Reference in New Issue
Block a user