@@ -47,55 +47,56 @@ interface ToolMeta {
4747 would ?: string
4848}
4949
50- const KNOWN : Record < string , ToolMeta > = {
51- memory_recall : { running : 'Searching memory' , done : 'Searched memory' , icon : IconBrain } ,
52- memory_search : { running : 'Searching memory' , done : 'Searched memory' , icon : IconBrain } ,
50+ /** Every tool the window names; each has a `would` line for waiting approvals and try runs (tests/approvalRisk.test.ts). */
51+ export const KNOWN : Record < string , ToolMeta > = {
52+ memory_recall : { running : 'Searching memory' , done : 'Searched memory' , icon : IconBrain , would : 'Would search memory' } ,
53+ memory_search : { running : 'Searching memory' , done : 'Searched memory' , icon : IconBrain , would : 'Would search memory' } ,
5354 memory_save : { running : 'Saving to memory' , done : 'Saved to memory' , icon : IconBrain , would : 'Would save to memory' } ,
5455 memory_remember : { running : 'Saving to memory' , done : 'Saved to memory' , icon : IconBrain , would : 'Would save to memory' } ,
5556 memory_add : { running : 'Saving to memory' , done : 'Saved to memory' , icon : IconBrain , would : 'Would save to memory' } ,
5657 memory_forget : { running : 'Forgetting' , done : 'Forgot' , icon : IconBrain , would : 'Would forget' } ,
57- memory_search_history : { running : 'Searching past chats' , done : 'Searched past chats' , icon : IconHistory } ,
58- memory_search_by_source : { running : 'Searching memory' , done : 'Searched memory' , icon : IconBrain } ,
59- history_semantic_search : { running : 'Searching past chats' , done : 'Searched past chats' , icon : IconHistory } ,
60- history_time_search : { running : 'Looking back in time' , done : 'Looked back in time' , icon : IconHistory } ,
61- current_datetime : { running : 'Checking the date and time' , done : 'Checked the date and time' , icon : IconClock } ,
62- file_list : { running : 'Listing files' , done : 'Listed files' , icon : IconFolder } ,
63- file_read : { running : 'Reading file' , done : 'Read file' , icon : IconFile } ,
58+ memory_search_history : { running : 'Searching past chats' , done : 'Searched past chats' , icon : IconHistory , would : 'Would search past chats' } ,
59+ memory_search_by_source : { running : 'Searching memory' , done : 'Searched memory' , icon : IconBrain , would : 'Would search memory' } ,
60+ history_semantic_search : { running : 'Searching past chats' , done : 'Searched past chats' , icon : IconHistory , would : 'Would search past chats' } ,
61+ history_time_search : { running : 'Looking back in time' , done : 'Looked back in time' , icon : IconHistory , would : 'Would look back in time' } ,
62+ current_datetime : { running : 'Checking the date and time' , done : 'Checked the date and time' , icon : IconClock , would : 'Would check the date and time' } ,
63+ file_list : { running : 'Listing files' , done : 'Listed files' , icon : IconFolder , would : 'Would list files' } ,
64+ file_read : { running : 'Reading file' , done : 'Read file' , icon : IconFile , would : 'Would read a file' } ,
6465 file_write : { running : 'Writing file' , done : 'Wrote file' , icon : IconFilePencil , would : 'Would write file' } ,
65- folder_search : { running : 'Searching your notes' , done : 'Searched your notes' , icon : IconNotebook } ,
66- folder_read : { running : 'Reading a note' , done : 'Read a note' , icon : IconNotebook } ,
67- time_now : { running : 'Checking the time' , done : 'Checked the time' , icon : IconClock } ,
68- current_time : { running : 'Checking the time' , done : 'Checked the time' , icon : IconClock } ,
69- skill_view : { running : 'Opening skill' , done : 'Opened skill' , icon : IconSparkles } ,
66+ folder_search : { running : 'Searching your notes' , done : 'Searched your notes' , icon : IconNotebook , would : 'Would search your notes' } ,
67+ folder_read : { running : 'Reading a note' , done : 'Read a note' , icon : IconNotebook , would : 'Would read a note' } ,
68+ time_now : { running : 'Checking the time' , done : 'Checked the time' , icon : IconClock , would : 'Would check the time' } ,
69+ current_time : { running : 'Checking the time' , done : 'Checked the time' , icon : IconClock , would : 'Would check the time' } ,
70+ skill_view : { running : 'Opening skill' , done : 'Opened skill' , icon : IconSparkles , would : 'Would open a skill' } ,
7071 skill_save : { running : 'Saving a skill' , done : 'Saved a skill' , icon : IconSparkles , would : 'Would save a skill' } ,
71- skill_list : { running : 'Listing skills' , done : 'Listed skills' , icon : IconSparkles } ,
72- web_search : { running : 'Searching the web' , done : 'Searched the web' , icon : IconWorld } ,
72+ skill_list : { running : 'Listing skills' , done : 'Listed skills' , icon : IconSparkles , would : 'Would list skills' } ,
73+ web_search : { running : 'Searching the web' , done : 'Searched the web' , icon : IconWorld , would : 'Would search the web' } ,
7374 // §10-13 code, helpers, browser and devices
7475 execute_code : { running : 'Running code' , done : 'Ran code' , icon : IconTerminal2 , would : 'Would run code' } ,
7576 terminal_run : { running : 'Running a command' , done : 'Ran a command' , icon : IconTerminal2 , would : 'Would run a command' } ,
7677 delegate_task : { running : 'Asking a helper' , done : 'Asked a helper' , icon : IconUserBolt , would : 'Would ask a helper' } ,
7778 delegate_tasks : { running : 'Asking helpers' , done : 'Asked helpers' , icon : IconUsersGroup , would : 'Would ask helpers' } ,
78- read_with_reader : { running : 'Reading it with a safe reader' , done : 'Read it with a safe reader' , icon : IconShieldSearch } ,
79- browser_open : { running : 'Opening a page' , done : 'Opened a page' , icon : IconWorldWww } ,
80- browser_snapshot : { running : 'Reading the page' , done : 'Read the page' , icon : IconListDetails } ,
79+ read_with_reader : { running : 'Reading it with a safe reader' , done : 'Read it with a safe reader' , icon : IconShieldSearch , would : 'Would read it with a safe reader' } ,
80+ browser_open : { running : 'Opening a page' , done : 'Opened a page' , icon : IconWorldWww , would : 'Would open a page' } ,
81+ browser_snapshot : { running : 'Reading the page' , done : 'Read the page' , icon : IconListDetails , would : 'Would read the page' } ,
8182 browser_click : { running : 'Clicking' , done : 'Clicked' , icon : IconPointer , would : 'Would click' } ,
8283 browser_type : { running : 'Typing' , done : 'Typed' , icon : IconKeyboard , would : 'Would type' } ,
8384 browser_select : { running : 'Choosing an option' , done : 'Chose an option' , icon : IconListDetails , would : 'Would choose an option' } ,
8485 browser_press : { running : 'Pressing a key' , done : 'Pressed a key' , icon : IconKeyboard , would : 'Would press a key' } ,
85- browser_scroll : { running : 'Scrolling' , done : 'Scrolled' , icon : IconArrowsVertical } ,
86- browser_back : { running : 'Going back' , done : 'Went back' , icon : IconArrowBackUp } ,
87- browser_tabs : { running : 'Checking tabs' , done : 'Checked tabs' , icon : IconAppWindow } ,
88- browser_switch_tab : { running : 'Switching tabs' , done : 'Switched tabs' , icon : IconAppWindow } ,
89- browser_extract : { running : 'Reading the page' , done : 'Read the page' , icon : IconListDetails } ,
90- browser_screenshot : { running : 'Taking a screenshot' , done : 'Took a screenshot' , icon : IconScreenshot } ,
91- browser_close : { running : 'Closing the browser' , done : 'Closed the browser' , icon : IconWorld } ,
92- device_list : { running : 'Checking your devices' , done : 'Checked your devices' , icon : IconDevices } ,
93- device_take_photo : { running : 'Taking a photo' , done : 'Took a photo' , icon : IconCamera } ,
94- device_capture_screen : { running : 'Looking at the screen' , done : 'Looked at the screen' , icon : IconScreenshot } ,
95- device_get_location : { running : 'Finding your location' , done : 'Found your location' , icon : IconMapPin } ,
96- device_notify : { running : 'Sending a notification' , done : 'Sent a notification' , icon : IconBellRinging } ,
97- device_display : { running : 'Showing it on your device' , done : 'Showed it on your device' , icon : IconDevices } ,
98- device_speak : { running : 'Speaking on your device' , done : 'Spoke on your device' , icon : IconSpeakerphone }
86+ browser_scroll : { running : 'Scrolling' , done : 'Scrolled' , icon : IconArrowsVertical , would : 'Would scroll' } ,
87+ browser_back : { running : 'Going back' , done : 'Went back' , icon : IconArrowBackUp , would : 'Would go back' } ,
88+ browser_tabs : { running : 'Checking tabs' , done : 'Checked tabs' , icon : IconAppWindow , would : 'Would check tabs' } ,
89+ browser_switch_tab : { running : 'Switching tabs' , done : 'Switched tabs' , icon : IconAppWindow , would : 'Would switch tabs' } ,
90+ browser_extract : { running : 'Reading the page' , done : 'Read the page' , icon : IconListDetails , would : 'Would read the page' } ,
91+ browser_screenshot : { running : 'Taking a screenshot' , done : 'Took a screenshot' , icon : IconScreenshot , would : 'Would take a screenshot' } ,
92+ browser_close : { running : 'Closing the browser' , done : 'Closed the browser' , icon : IconWorld , would : 'Would close the browser' } ,
93+ device_list : { running : 'Checking your devices' , done : 'Checked your devices' , icon : IconDevices , would : 'Would check your devices' } ,
94+ device_take_photo : { running : 'Taking a photo' , done : 'Took a photo' , icon : IconCamera , would : 'Would take a photo' } ,
95+ device_capture_screen : { running : 'Looking at the screen' , done : 'Looked at the screen' , icon : IconScreenshot , would : 'Would look at the screen' } ,
96+ device_get_location : { running : 'Finding your location' , done : 'Found your location' , icon : IconMapPin , would : 'Would find your location' } ,
97+ device_notify : { running : 'Sending a notification' , done : 'Sent a notification' , icon : IconBellRinging , would : 'Would send a notification' } ,
98+ device_display : { running : 'Showing it on your device' , done : 'Showed it on your device' , icon : IconDevices , would : 'Would show it on your device' } ,
99+ device_speak : { running : 'Speaking on your device' , done : 'Spoke on your device' , icon : IconSpeakerphone , would : 'Would speak on your device' }
99100}
100101
101102const PREFIX : Array < [ RegExp , Icon ] > = [
@@ -138,6 +139,12 @@ export function wouldLabel(name: string): string {
138139 return `Would use ${ meta . done } `
139140}
140141
142+ /** What a waiting approval says the call would do, in plain words; null for a known tool without such wording
143+ * (its past-tense label would read "Would use Checked the date and time"). */
144+ export function askingLabel ( name : string ) : string | null {
145+ return KNOWN [ name ] && ! KNOWN [ name ] . would ? null : wouldLabel ( name )
146+ }
147+
141148export function toolMeta ( name : string ) : ToolMeta {
142149 const known = KNOWN [ name ]
143150 if ( known ) return known
0 commit comments