refactor: skill 脚本输出改为结构化 JSON

- query_weather: {location, now: {temp,text}, forecast: [{date,day,night,tempMin,tempMax}]}
- search_web: {query, answer, results: [{title,url,content}]}
- get_current_datetime: {datetime}
- list_scheduled_tasks: {tasks: [{name,description,enabled,command,...}]}
- manage_scheduled_task: {ok, action, name} / {error}

LLM 直接看到结构化数据,不再依赖脚本拼接的中文自然语言
This commit is contained in:
2026-06-02 10:32:27 +08:00
parent fac2016b7e
commit 81c736f873
5 changed files with 111 additions and 253 deletions
@@ -10,7 +10,7 @@ except: print('full')
" 2>/dev/null || echo "full")
case "$format" in
date) TZ='Asia/Shanghai' date '+%Y-%m-%d' ;;
time) TZ='Asia/Shanghai' date '+%H:%M:%S' ;;
*) TZ='Asia/Shanghai' date '+%Y-%m-%d %H:%M:%S' ;;
date) TZ='Asia/Shanghai' date '+{"datetime": "%Y-%m-%d"}' ;;
time) TZ='Asia/Shanghai' date '+{"datetime": "%H:%M:%S"}' ;;
*) TZ='Asia/Shanghai' date '+{"datetime": "%Y-%m-%d %H:%M:%S"}' ;;
esac