Skip to content

feat: keep short context inline - #34

Merged
Activer007 merged 2 commits into
mainfrom
feat/m2-context-phase1-inline
May 13, 2026
Merged

feat: keep short context inline#34
Activer007 merged 2 commits into
mainfrom
feat/m2-context-phase1-inline

Conversation

@Activer007

Copy link
Copy Markdown
Owner

Summary

  • add current_input_file.inline_max_tokens with a 30000-token default
  • keep short compiled contexts inline instead of uploading generated context/tool files
  • expose the setting in admin settings and update API/prompt compatibility docs

Tests

  • ./scripts/lint.sh
  • ./tests/scripts/check-refactor-line-gate.sh
  • ./tests/scripts/run-unit-all.sh
  • npm run build --prefix webui

Replacement for closed stacked PR #32 after its base branch was squash-merged.

@Activer007
Activer007 force-pushed the feat/m2-context-phase1-inline branch from c6c06a8 to eb1d3eb Compare May 13, 2026 02:59
@Activer007
Activer007 merged commit f40f9b6 into main May 13, 2026
@Activer007
Activer007 deleted the feat/m2-context-phase1-inline branch May 13, 2026 03:00

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: eb1d3ebb7e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines 118 to +122
if currentInputFile.MinChars != 0 {
return ValidateIntRange("current_input_file.min_chars", currentInputFile.MinChars, 1, 100000000, true)
}
if currentInputFile.InlineMaxTokens != 0 {
return ValidateIntRange("current_input_file.inline_max_tokens", currentInputFile.InlineMaxTokens, 1, 100000000, true)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Validate both current_input_file fields before returning

ValidateCurrentInputFileConfig returns immediately when min_chars is non-zero, so the new inline_max_tokens check never runs in configs that set both fields. A config like {min_chars: 1, inline_max_tokens: -1} is therefore accepted by ValidateConfig, which allows an invalid threshold into runtime behavior. Please avoid early return here and validate min_chars and inline_max_tokens independently so both constraints are enforced when both keys are present.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant