feat: configurable thinking truncation via CCBOT_MAX_THINKING_CHARS#63
Open
asturwebs wants to merge 1 commit intosix-ddc:mainfrom
Open
feat: configurable thinking truncation via CCBOT_MAX_THINKING_CHARS#63asturwebs wants to merge 1 commit intosix-ddc:mainfrom
asturwebs wants to merge 1 commit intosix-ddc:mainfrom
Conversation
Contributor
Author
|
Same as #64 — the 2 failing checks are pre-existing issues on
All 3 files in this PR ( |
4e557fb to
1d9de04
Compare
- Replace hardcoded 500-char thinking truncation with env-var config - CCBOT_MAX_THINKING_CHARS defaults to 0 (no truncation, full thinking) - Set to e.g. 500 to restore compact thinking messages - Add scripts/update.sh for hourly auto-updates from upstream Co-Authored-By: BytIA <bytia@asturwebs.com>
1d9de04 to
7689255
Compare
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.
Summary
CCBOT_MAX_THINKING_CHARSenv var. Defaults to0(no truncation, full thinking forwarded to Telegram). Set to e.g.500to restore compact thinking messages.Changes
src/ccbot/handlers/response_builder.pybuild_response_parts()gainsmax_thinking_charsparameter (default0)max_thinking_chars > 0, truncates thinking content at the configured limit0(default), full thinking content is forwarded unchangedsrc/ccbot/config.pymax_thinking_charsfromCCBOT_MAX_THINKING_CHARSenv var (default0)src/ccbot/bot.pyconfig.max_thinking_charstobuild_response_parts()tests/ccbot/handlers/test_response_builder.pyUsage
Test plan
ruff checkpassesruff formatpasses (our files)pyright— 0 errorsNote: pre-existing
ruff formatfailure onbot.pyis unrelated to this PR (see comment).