char-fork/llama.cpp
git clone https://git.t4t.associates/char-fork/llama.cpp
0021a77de
char/aliceai-t5-moe
1// Registry of server and browser tools whose renderer 2// shows a recognizable icon and friendly label inline in the chat UI. 3// 4// To add a new tool, add an entry to TOOL_UI. To give a 5// tool a custom title or body renderer, add a dedicated component under 6// ChatMessageToolCall/ and route it in ChatMessageToolCallBlock.svelte 7// (see ChatMessageToolCallBlockGetDatetime and 8// ChatMessageToolCallBlockSearchResults for prior art). 9 10import { 11Braces , 12Clock , 13Eye , 14FilePen , 15FilePlus , 16FileSearch , 17FileText , 18Info , 19SearchCode , 20Terminal 21} from '@lucide/svelte' ; 22import { BuiltInTool , ToolSource } from '$lib/enums' ; 23import type { ToolUiEntry } from '$lib/types' ; 24 25export const TOOL_UI :Readonly < Record < BuiltInTool , ToolUiEntry >> = { 26[ BuiltInTool . BROWSER_GET_DATETIME ] :{ 27icon :Clock , 28label :'Current time' , 29source :ToolSource . BROWSER 30}, 31[ BuiltInTool . BROWSER_READ_MEDIA ] :{ icon :Eye , label :'Read media' , source :ToolSource . BROWSER }, 32[ BuiltInTool . BROWSER_RUN_JAVASCRIPT ] :{ 33icon :Braces , 34label :'Run JavaScript' , 35source :ToolSource . BROWSER 36}, 37[ BuiltInTool . SERVER_EDIT_FILE ] :{ icon :FilePen , label :'Edit file' , source :ToolSource . SERVER }, 38[ BuiltInTool . SERVER_EXEC_SHELL_COMMAND ] :{ 39icon :Terminal , 40label :'Run command' , 41source :ToolSource . SERVER 42}, 43[ BuiltInTool . SERVER_FILE_GLOB_SEARCH ] :{ 44icon :FileSearch , 45label :'Search files' , 46source :ToolSource . SERVER 47}, 48[ BuiltInTool . SERVER_GET_INFO ] :{ icon :Info , label :'Runtime info' , source :ToolSource . SERVER }, 49[ BuiltInTool . SERVER_GREP_SEARCH ] :{ 50icon :SearchCode , 51label :'Search in files' , 52source :ToolSource . SERVER 53}, 54[ BuiltInTool . SERVER_READ_FILE ] :{ icon :FileText , label :'Read file' , source :ToolSource . SERVER }, 55[ BuiltInTool . SERVER_WRITE_FILE ] :{ 56icon :FilePlus , 57label :'Write file' , 58source :ToolSource . SERVER 59} 60} as const ;