diff --git a/bin/assets/plugins/aiassistant.json b/bin/assets/plugins/aiassistant.json index b190a2ef3..00945f63c 100644 --- a/bin/assets/plugins/aiassistant.json +++ b/bin/assets/plugins/aiassistant.json @@ -9,74 +9,36 @@ "name": "claude-opus-4-6" }, { - "cache_configuration": { - "max_cache_anchors": 4, - "min_total_token": 2048, - "should_speculate": true - }, - "default_temperature": 1.0, + "display_name": "Claude Opus 4.7", + "name": "claude-opus-4-7" + }, + { "display_name": "Claude Opus 4.5", - "max_output_tokens": 8192, "max_tokens": 200000, "name": "claude-opus-4-5-20251101" }, { - "cache_configuration": { - "max_cache_anchors": 4, - "min_total_token": 2048, - "should_speculate": true - }, - "default_temperature": 1.0, "display_name": "Claude Haiku 4.5", - "max_output_tokens": 8192, "max_tokens": 200000, "name": "claude-haiku-4-5-20251001" }, { - "cache_configuration": { - "max_cache_anchors": 4, - "min_total_token": 2048, - "should_speculate": true - }, - "default_temperature": 1.0, "display_name": "Claude Sonnet 4.5", - "max_output_tokens": 8192, "max_tokens": 200000, "name": "claude-sonnet-4-5-20250929" }, { - "cache_configuration": { - "max_cache_anchors": 4, - "min_total_token": 2048, - "should_speculate": true - }, - "default_temperature": 1.0, "display_name": "Claude Opus 4.1", - "max_output_tokens": 8192, "max_tokens": 200000, "name": "claude-opus-4-1-20250805" }, { - "cache_configuration": { - "max_cache_anchors": 4, - "min_total_token": 2048, - "should_speculate": true - }, - "default_temperature": 1.0, "display_name": "Claude Opus 4", - "max_output_tokens": 8192, "max_tokens": 200000, "name": "claude-opus-4-20250514" }, { - "cache_configuration": { - "max_cache_anchors": 4, - "min_total_token": 2048, - "should_speculate": true - }, - "default_temperature": 1.0, "display_name": "Claude Sonnet 4", - "max_output_tokens": 8192, "max_tokens": 200000, "name": "claude-sonnet-4-20250514" } @@ -88,17 +50,13 @@ "display_name": "DeepSeek", "models": [ { - "display_name": "DeepSeek Chat", - "max_output_tokens": 8192, - "max_tokens": 64000, - "name": "deepseek-chat", + "display_name": "DeepSeek V4 Flash", + "name": "deepseek-v4-flash", "cheapest": true }, { - "display_name": "DeepSeek Reasoner", - "max_output_tokens": 8192, - "max_tokens": 64000, - "name": "deepseek-reasoner" + "display_name": "DeepSeek V4 Pro", + "name": "deepseek-v4-pro" } ], "version": 1 @@ -246,6 +204,18 @@ { "name": "gpt-5.2" }, + { + "name": "gpt-5.3" + }, + { + "name": "gpt-5.4" + }, + { + "name": "gpt-5.5" + }, + { + "name": "gpt-5.5-pro" + }, { "name": "gpt-5.2-pro" }, @@ -486,6 +456,9 @@ "models": [ { "name": "kimi-k2.5" + }, + { + "name": "kimi-k2.6" } ] }, @@ -524,6 +497,10 @@ "api_url": "https://api.together.xyz/v1/chat/completions", "display_name": "Together AI", "models": [ + { + "name": "deepseek-ai/DeepSeek-V4-Pro", + "display_name": "Deepseek V4 Pro" + }, { "name": "zai-org/GLM-5.1", "display_name": "GLM 5.1 FP4" @@ -532,6 +509,10 @@ "name": "moonshotai/Kimi-K2.5", "display_name": "Kimi K2.5" }, + { + "name": "moonshotai/Kimi-K2.6", + "display_name": "Kimi K2.6 Fp4" + }, { "name": "MiniMaxAI/MiniMax-M2.7", "display_name": "MiniMax M2.7 FP4" diff --git a/include/eepp/ui/doc/textdocument.hpp b/include/eepp/ui/doc/textdocument.hpp index b74c51f49..a217b674f 100644 --- a/include/eepp/ui/doc/textdocument.hpp +++ b/include/eepp/ui/doc/textdocument.hpp @@ -658,7 +658,7 @@ class EE_API TextDocument { TextPosition getMatchingBracket( TextPosition startPosition, const String::StringBaseType& openBracket, const String::StringBaseType& closeBracket, MatchDirection dir, - bool allowDepth = true ); + bool allowDepth = true, Time timeout = Time::Zero ); TextRange getMatchingBracket( TextPosition startPosition, const String& openBracket, const String& closeBracket, MatchDirection dir, diff --git a/src/eepp/ui/doc/textdocument.cpp b/src/eepp/ui/doc/textdocument.cpp index a6649d8ee..99f243dcb 100644 --- a/src/eepp/ui/doc/textdocument.cpp +++ b/src/eepp/ui/doc/textdocument.cpp @@ -1819,9 +1819,13 @@ TextPosition TextDocument::positionOffset( TextPosition position, int columnOffs // As long as we are not at a grapheme boundary yet, keep // moving the cursor position until we arrive at one - while ( cursorIndex > 0 && cursorIndex < lineLen - 1 && - !getLineText( position.line() ).isGraphemeBoundary( cursorIndex ) ) { - cursorIndex += direction; + if ( position.line() >= 0 && position.line() < static_cast( mLines.size() ) ) { + Lock l( mLinesMutex ); + const auto& text = mLines[position.line()].getText(); + while ( cursorIndex > 0 && cursorIndex < lineLen - 1 && + !text.isGraphemeBoundary( cursorIndex ) ) { + cursorIndex += direction; + } } if ( position.column() != cursorIndex ) @@ -3883,10 +3887,11 @@ static inline void changeDepth( SyntaxHighlighter* highlighter, int& depth, cons TextPosition TextDocument::getMatchingBracket( TextPosition sp, const String::StringBaseType& openBracket, const String::StringBaseType& closeBracket, - MatchDirection dir, bool allowDepth ) { + MatchDirection dir, bool allowDepth, Time timeout ) { SyntaxHighlighter* highlighter = getHighlighter(); int depth = 0; - while ( sp.isValid() ) { + Clock c; + while ( sp.isValid() && ( timeout == Time::Zero || c.getElapsedTime() < timeout ) ) { auto byte = getCharFromUnsanitizedPosition( sp ); if ( byte == openBracket ) { changeDepth( highlighter, depth, sp, 1 ); diff --git a/src/eepp/ui/uicodeeditor.cpp b/src/eepp/ui/uicodeeditor.cpp index ba7a4e6bc..c86c22e9b 100644 --- a/src/eepp/ui/uicodeeditor.cpp +++ b/src/eepp/ui/uicodeeditor.cpp @@ -3261,14 +3261,16 @@ void UICodeEditor::checkMatchingBrackets() { String::StringBaseType openBracket = open[index]; String::StringBaseType closeBracket = close[index]; TextPosition closePosition = mDoc->getMatchingBracket( - pos, openBracket, closeBracket, TextDocument::MatchDirection::Forward ); + pos, openBracket, closeBracket, TextDocument::MatchDirection::Forward, true, + Milliseconds( 100 ) ); mMatchingBrackets = { pos, closePosition }; } else if ( isCloseIt != close.end() ) { size_t index = std::distance( close.begin(), isCloseIt ); String::StringBaseType openBracket = open[index]; String::StringBaseType closeBracket = close[index]; TextPosition closePosition = mDoc->getMatchingBracket( - pos, openBracket, closeBracket, TextDocument::MatchDirection::Backward ); + pos, openBracket, closeBracket, TextDocument::MatchDirection::Backward, true, + Milliseconds( 100 ) ); mMatchingBrackets = { pos, closePosition }; } } diff --git a/src/tools/ecode/plugins/aiassistant/aiassistantplugin.cpp b/src/tools/ecode/plugins/aiassistant/aiassistantplugin.cpp index 3ccfececd..37901862b 100644 --- a/src/tools/ecode/plugins/aiassistant/aiassistantplugin.cpp +++ b/src/tools/ecode/plugins/aiassistant/aiassistantplugin.cpp @@ -21,9 +21,10 @@ static std::initializer_list AIAssistantUnlockedCommandList = { static std::initializer_list AIAssistantCommandList = { - "ai-prompt", "ai-add-chat", "ai-chat-history", "ai-attach-file", - "ai-clone-chat", "ai-settings", "ai-toggle-private-chat", "ai-save-chat", - "ai-rename-chat", "ai-show-menu", "ai-chat-toggle-role", "ai-refresh-local-models", + "ai-prompt", "ai-chat-history", "ai-attach-file", "ai-link-file", + "ai-clone-chat", "ai-settings", "ai-toggle-private-chat", "ai-save-chat", + "ai-rename-chat", "ai-show-menu", "ai-chat-toggle-role", "ai-refresh-local-models", + "ai-add-chat", "ai-select-model", "ai-toggle-agent-mode", "ai-agent-config", "new-ai-assistant" }; @@ -406,7 +407,6 @@ void AIAssistantPlugin::loadAIAssistantConfig( const std::string& path, bool upd if ( mKeyBindings.empty() ) { mKeyBindings["new-ai-assistant"] = "mod+shift+m"; mKeyBindings["ai-prompt"] = "mod+return"; - mKeyBindings["ai-add-chat"] = "mod+shift+return"; mKeyBindings["ai-chat-history"] = "mod+h"; mKeyBindings["ai-clone-chat"] = "mod+shift+c"; mKeyBindings["ai-settings"] = "mod+shift+s"; @@ -417,8 +417,11 @@ void AIAssistantPlugin::loadAIAssistantConfig( const std::string& path, bool upd mKeyBindings["ai-chat-toggle-role"] = "mod+shift+r"; mKeyBindings["ai-refresh-local-models"] = "mod+shift+l"; mKeyBindings["ai-attach-file"] = "mod+shift+a"; + mKeyBindings["ai-link-file"] = "mod+shift+z"; + mKeyBindings["ai-select-model"] = "mod+shift+x"; mKeyBindings["ai-toggle-agent-mode"] = "mod+shift+d"; mKeyBindings["ai-agent-config"] = "shift+alt+c"; + mKeyBindings["ai-add-chat"] = "mod+shift+return"; } auto& kb = j["keybindings"]; diff --git a/src/tools/ecode/plugins/aiassistant/chatui.cpp b/src/tools/ecode/plugins/aiassistant/chatui.cpp index 9c2d9ce12..49b1569a1 100644 --- a/src/tools/ecode/plugins/aiassistant/chatui.cpp +++ b/src/tools/ecode/plugins/aiassistant/chatui.cpp @@ -1195,7 +1195,6 @@ void LLMChatUI::bindCmds( UICodeEditor* editor, bool bindToChatUI ) { addKb( editor, "mod+shift+a", "ai-attach-file", bindToChatUI ); addKb( editor, "mod+shift+z", "ai-link-file", bindToChatUI ); addKb( editor, "mod+shift+x", "ai-select-model", bindToChatUI ); - addKb( editor, "mod+shift+x", "ai-select-agent", bindToChatUI ); addKb( editor, "mod+shift+d", "ai-toggle-agent-mode", bindToChatUI ); addKb( editor, "shift+alt+c", "ai-agent-config", bindToChatUI );