mirror of
https://github.com/Syngnat/GoNavi.git
synced 2026-05-31 08:39:49 +08:00
🐛 fix(ai/query-editor/mac-window): 修复模型兼容性并优化即时执行与窗口交互
- AI 兼容性:为 Anthropic Provider 补齐 tools/tool_use/tool_result 协议转换,支持工具调用与流式工具结果解析 - 降级策略:OpenAI 兼容接口在 tools 请求返回 400/422/404 时自动回退为纯文本模式 - 配置修复:调整 MiniMax 预设为 Anthropic 兼容端点并更新默认模型列表 - 状态隔离:AI 聊天面板停止将动态模型列表写回供应商配置,避免污染静态 models 数据 - 编辑器修复:QueryEditor 在 runImmediately 场景下避免重复追加 SQL,改为直接选中并执行 - 交互优化:修复 macOS 原生窗口控制切换与标题栏点击行为,避免窗口按钮状态异常
This commit is contained in:
@@ -8,6 +8,9 @@ package app
|
||||
#import <Cocoa/Cocoa.h>
|
||||
#import <dispatch/dispatch.h>
|
||||
|
||||
static inline BOOL gonaviBoolYES() { return YES; }
|
||||
static inline BOOL gonaviBoolNO() { return NO; }
|
||||
|
||||
static void gonaviSetWindowButtonsVisible(NSWindow *window, BOOL visible) {
|
||||
if (window == nil) {
|
||||
return;
|
||||
@@ -62,9 +65,9 @@ import "C"
|
||||
|
||||
func setMacNativeWindowControls(enabled bool) {
|
||||
state := resolveMacNativeWindowControlState(enabled)
|
||||
flag := C.BOOL(false)
|
||||
if state.ShowNativeButtons {
|
||||
flag = C.BOOL(true)
|
||||
C.gonaviApplyMacWindowStyle(C.gonaviBoolYES())
|
||||
} else {
|
||||
C.gonaviApplyMacWindowStyle(C.gonaviBoolNO())
|
||||
}
|
||||
C.gonaviApplyMacWindowStyle(flag)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user