@gui-chat-plugin/todo
v0.1.1
Published
Todo list plugin for GUIChat
Downloads
347
Readme
@gui-chat-plugin/todo
Todo list plugin for GUI Chat applications. Manage tasks with a persistent todo list that syncs via localStorage.
Features
- Add, update, and delete todo items
- Mark tasks as completed/uncompleted
- Clear all completed items at once
- Persistent storage via localStorage
- Inline text editing capability
Installation
yarn add @gui-chat-plugin/todoUsage
Vue Integration
// In src/tools/index.ts
import TodoPlugin from "@gui-chat-plugin/todo/vue";
const pluginList = [
// ... other plugins
TodoPlugin,
];
// In src/main.ts
import "@gui-chat-plugin/todo/style.css";Core-only Usage
import { executeTodo, TOOL_DEFINITION } from "@gui-chat-plugin/todo";
// Show the todo list
const result = await executeTodo(context, {
action: "show",
});
// Add a new item
const result = await executeTodo(context, {
action: "add",
text: "Buy groceries",
});API
TodoArgs
interface TodoArgs {
action: "show" | "add" | "toggle" | "delete" | "clear_completed" | "update";
text?: string; // For add/update actions
itemId?: string; // For toggle/delete/update actions
}TodoItem
interface TodoItem {
id: string;
text: string;
completed: boolean;
createdAt: number;
}Development
# Install dependencies
yarn install
# Run demo
yarn dev
# Build
yarn build
# Lint
yarn lintTest Prompts
Try these prompts to test the plugin:
- "Show me my todo list"
- "Add 'Buy groceries' to my todo list"
- "I finished shopping, mark the groceries task as done"
License
MIT
