win 002066e700 chore(wip): 保存订制改动以便合并上游
- windsurf: client/pool/local_ls/tool_emulation/tool_names/models 调整
- handler: admin account_data / failover_loop / gateway_handler
- repository: scheduler_cache 及测试
- service: windsurf_chat_service / windsurf_gateway_service
- deploy: compose 合并为单文件(含 windsurf-ls profile),Dockerfile.ls
- cmd: 新增 dump_ls_models / dump_preamble / test_windsurf_tools 辅助工具
2026-04-24 11:14:36 +08:00

22 lines
587 B
Go

package main
import (
"encoding/json"
"fmt"
"os"
"github.com/Wei-Shaw/sub2api/internal/pkg/windsurf"
)
func main() {
tc := "auto"
if len(os.Args) > 1 {
tc = os.Args[1]
}
tools := []windsurf.OpenAITool{
{Type: "function", Function: windsurf.OpenAIFunction{Name: "read_file", Description: "Read a file", Parameters: json.RawMessage(`{"type":"object"}`)}},
{Type: "function", Function: windsurf.OpenAIFunction{Name: "find_file", Description: "Find files", Parameters: json.RawMessage(`{"type":"object"}`)}},
}
fmt.Println(windsurf.BuildToolPreambleForProto(tools, tc))
}