extractQueryArg is a convenience wrapper for builtins that show a query string in the spinner. Tries the common key names used by both @websearch (query/q) and assistant-style payloads.
(args []string)
| 152 | // query string in the spinner. Tries the common key names used by both |
| 153 | // @websearch (query/q) and assistant-style payloads. |
| 154 | func extractQueryArg(args []string) string { |
| 155 | return extractStringArg(args, "query", "q", "term", "search") |
| 156 | } |
| 157 | |
| 158 | // extractURLArg is the analog for @webfetch. |
| 159 | func extractURLArg(args []string) string { |