generated from nhcarrigan/template
feat: add /search command to highlight matches in conversation
Closes #32
This commit is contained in:
@@ -3,6 +3,7 @@ import { invoke } from "@tauri-apps/api/core";
|
||||
import { claudeStore } from "$lib/stores/claude";
|
||||
import { characterState } from "$lib/stores/character";
|
||||
import { setSkipNextGreeting } from "$lib/tauri";
|
||||
import { searchState } from "$lib/stores/search";
|
||||
|
||||
export interface SlashCommand {
|
||||
name: string;
|
||||
@@ -145,6 +146,20 @@ export const slashCommands: SlashCommand[] = [
|
||||
claudeStore.addLine("system", `Available commands:\n${helpText}`);
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "search",
|
||||
description: "Search within the conversation (use /search to clear)",
|
||||
usage: "/search [query]",
|
||||
execute: (args: string) => {
|
||||
if (!args.trim()) {
|
||||
searchState.clear();
|
||||
claudeStore.addLine("system", "Search cleared");
|
||||
return;
|
||||
}
|
||||
searchState.setQuery(args.trim());
|
||||
claudeStore.addLine("system", `Searching for: "${args.trim()}"`);
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "summarise",
|
||||
description: "Get a summary of the entire conversation",
|
||||
|
||||
Reference in New Issue
Block a user