TypeScript 编译错误:
Argument of type 'Config' is not assignable to parameter of type 'SessionConfig'.
Property 'cwd' is missing in type 'Config' but required in type 'SessionConfig'.
Go 后端的 SessionConfig 结构体包含 cwd 字段:
type SessionConfig struct {
Cwd string `json:"cwd"`
Provider string `json:"provider,omitempty"`
Model string `json:"model,omitempty"`
Mode string `json:"mode,omitempty"`
Thinking string `json:"thinking,omitempty"`
}但前端的 Config 接口缺少 cwd 字段。
// 修复前
interface Config {
provider: string
model: string
mode: string
thinking: string
}
// 修复后
interface Config {
cwd: string
provider: string
model: string
mode: string
thinking: string
}// 修复前
const [config, setConfig] = useState<Config>({
provider: 'deepseek-openai',
model: 'deepseek-v4-flash',
mode: 'agent',
thinking: 'medium'
})
// 修复后
const [config, setConfig] = useState<Config>({
cwd: '',
provider: 'deepseek-openai',
model: 'deepseek-v4-flash',
mode: 'agent',
thinking: 'medium'
})frontend/src/App.tsxfrontend/src/components/Settings.tsx
wails build构建成功:
✅ Generating bindings
✅ Installing frontend dependencies
✅ Compiling frontend
✅ Compiling application
✅ Packaging application
Built 'build/bin/vibecoding-gui' in 37.817s
- 测试 GUI 设置功能
- 验证配置更新
- 测试完整的消息流程