Skip to content

feat: add configurable constants for OpenCode context and output limits#6

Merged
zhujian0805 merged 1 commit into
Chat2AnyLLM:mainfrom
zhujian0805:main
Dec 8, 2025
Merged

feat: add configurable constants for OpenCode context and output limits#6
zhujian0805 merged 1 commit into
Chat2AnyLLM:mainfrom
zhujian0805:main

Conversation

@zhujian0805

Copy link
Copy Markdown
Collaborator
  • Added DEFAULT_CONTEXT_LIMIT = 256000 and DEFAULT_OUTPUT_LIMIT = 65536 constants
  • Updated config generation to use these constants instead of hardcoded values
  • Ensures consistent limits across all OpenCode configurations

🤖 Generated with Claude Code

Co-Authored-By: Claude noreply@anthropic.com

- Added DEFAULT_CONTEXT_LIMIT = 256000 and DEFAULT_OUTPUT_LIMIT = 65536 constants
- Updated config generation to use these constants instead of hardcoded values
- Ensures consistent limits across all OpenCode configurations

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@zhujian0805 zhujian0805 merged commit 7f0c752 into Chat2AnyLLM:main Dec 8, 2025
zhujian0805 added a commit that referenced this pull request Jun 23, 2026
Resolves 10 items from internal code review.

Security:
- Strip Environment from LaunchPlanDTO so /api/launch/dry-run no longer
  leaks resolved API keys to the desktop UI (#1).
- Gate NODE_TLS_REJECT_UNAUTHORIZED=*** on endpoint locality in launch.go;
  only applied for localhost/127.0.0.1/::1/0.0.0.0/empty endpoints. Public
  endpoints get strict TLS verification (#5).
- Sidecar middleware: replace CORS wildcard with Tauri origin whitelist,
  enforce Host header against the bound port, cap JSON bodies at 1 MiB
  via http.MaxBytesReader (#8, #10).

Robustness:
- RenameProvider now wraps insert/update/delete in a single transaction;
  partial failures no longer leave duplicate rows (#2).
- Replace panic on sidecar serve error with log.Printf (#3).
- editorconfig.DefaultRegistry() returns (*Registry, error) instead of
  panicking on parse failure; all 6 callsites updated (#4).

Hygiene:
- Remove cam-sidecar.exe from index, add to .gitignore (#6).
- Pin frontend "latest" deps to lockfile versions (#7).
- Remove legacy code_assistant_manager/ directory (386 files,
  no Go/TS/Rust references; only mentioned in stale docs) (#9).

Regression tests added for items 1, 2, 4, 5, 10.
go vet, go build, go test ./... all pass (22 packages green).
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