Repository navigation
Conversation
WebFetchTool: - charset-aware decoding (content-type → meta → utf-8) via TextDecoder - convert HTML to Markdown fully, then truncate once by maxChars (no more mid-tag cuts or double truncation) - single AbortController for the whole request+body cycle - new optional params: maxChars, raw, timeoutMs, userAgent (UA is only sent when explicitly provided) Telegram bot: - add _renderWebFetch card "AI is browsing a page" with clickable link, HTTP status and body preview in a collapsible quote - handle both success and error with a dedicated card - add fetch.* i18n strings (ru/en) Tests: extend WebFetchTool tests (charset, raw, maxChars, no mid-tag cut)
Revamp /sessions and /switch: add richer i18n (RU/EN) keys; implement live session reading from main (session-store + stats-store), formatted dates, short IDs and project labels; render sessions with per-session inline buttons and pager (pageSize=6); add callback handler (st_sw_) and direct main-process navigation (_navigateToSession) instead of relying on injected window.electronAPI; improve error messages and switch feedback. Also remove a stale test temp session file.
Read sessions directly from the main process (sessionStore + stats-store) instead of injecting window.electronAPI into the main world, which could be unavailable and caused a stale session list and silent /switch. Always re-read the list (drop the _pagers cache). Show all sessions when no project is selected, filter by project otherwise; display the project folder name (basename) with a small short-id footnote, human-readable dates (e.g. 'today, 14:30') and sorting by lastSeen; each session is an inline button (st_sw_<idx>) with the active one marked. Fix /switch by navigating directly from the main process via win.webContents.loadURL with clearer errors and a /sessions hint. Add /init: an inline file browser (drives -> folders, Up navigation, pagination, 'Select this folder' / 'Cancel') that opens a new chat, binds the folder as pendingProjectDir, builds the project system prompt and sends it via initial-prompt after did-finish-load. Update /help and i18n (init.*, common.cancel, help.cmd.init in ru and en).
…ommand DeepSeek toggles were matched by button text (deepthink/search), which fails on localized pages (e.g. ru: «Глубокое мышление»/«Умный поиск»). Now select by .ds-toggle-button order: [0]=DeepThink, [1]=Search. Also register the /init command for ru and en.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
描述
请简要描述这个 PR 做了什么。
关联 Issue
关联的 Issue 编号:#(例如 #123)
变更类型
测试
请描述你做了哪些测试来验证你的改动:
截图(如果适用)
补充信息