Merged
Conversation
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Sandbox chặn DNS fonts.googleapis.com nên `next/font/google` không fetch được Inter font lúc build. Thêm section 7.1 trong TOOLS.md giải thích root cause và quy trình escalate ra ngoài sandbox. Refs: nhật ký memory/2026-07-21.md, memory/2026-07-22.md
… sections - Section "Features đã xóa": update tham chiếu UPDATE-*.md (đã xóa khỏi working tree 2026-07-21, còn trong git history qua `git show`). - Section 11 (Runtime feature flag): update bảng guard file, bỏ executorHooks sau khi xóa dead code, smoke test mở rộng cho context_length + codex subagent, giải thích baseUrl.js + EnhancedConsoleLog không cần guard. - Section 12: verify mới nhất (360 PASS, 14 features, build pass ngoài sandbox). - Section 17 (NVIDIA NIM executor strip): xóa vì file dead code đã xóa. - Section 18 (mới): /v1/models context_length enrichment.
…strip - Thêm feature `auto-context-length`: bảo vệ fork layer contextLength/ + hook enrich `context_length` trong /api/v1/models (NVIDIA resolver + static). - Xóa feature `nvidia-executor-strip`: file open-sse/diepxuan/executorHooks.js bị xóa vì là dead code (không ai import/gọi). - Update feature `fork-branding-header`: bỏ `forbiddenFiles` cho DonateModal.js vì upstream v0.5.40 (commit ccb0842) thêm lại file. Fork chỉ cần đảm bảo Header.js không import DonateModal/voluteer_activism/Donate. - Tổng features: 13 -> 14.
…tured) - open-sse/diepxuan/executorHooks.js (37 dòng): `stripNvidiaUnsupportedParams` export nhưng không ai import/call. File dở dang, hook chưa wire vào base executor. Nếu sau này cần NVIDIA strip, tạo lại file + wrap với flag. - src/diepxuan/app/api/console-logs-structured/route.js (159 dòng): API route structured log. `EnhancedConsoleLog.jsx` dùng logic parseLogsIntoRequests inline, không gọi API này. Route bị bỏ rơi. Verified: enhanced-console-log feature KHÔNG bị ảnh hưởng (đã grep confirm trước khi xóa). Build pass ngoài sandbox sau khi xóa. Refs: docs/CUSTOM-FEATURES-MERGE-CHECKLIST.md §11 ghi chú (ghi lại lý do xóa).
4 file trong open-sse/diepxuan/contextLength/: - index.js: wrap getContextLength, getContextLengthBatchCached, getStaticContextLength, getContextLengthSync. Khi flag false: trả null/empty Map; getStaticContextLength vẫn trả giá trị nhưng không ghi DB. - cache.js: wrap initContextLengthCache, getCachedContextLength, upsertContextLength, getCachedContextLengthBatch, clearContextLengthCache. - modelsApi.js: wrap fetchProviderContextLengths, resolveProviderModelsWithContext. - errorParser.js: wrap extractContextLengthFromError, updateContextLengthFromError. Khi DIEPXUAN_ENABLED=false: /v1/models trả response KHÔNG có field context_length, giống upstream. Refs: docs/CUSTOM-FEATURES-MERGE-CHECKLIST.md §11 + §18.
`extendCodexSubagentConfig(config)` khi flag false: trả config gốc (không extend `description`). Codex config KHÔNG có `description` trong [agents.subagent], giống upstream. Refs: docs/CUSTOM-FEATURES-MERGE-CHECKLIST.md §11 + §15.
* fix(context-length): import isDiepXuanEnabled in cache.js upsertContextLength() called isDiepXuanEnabled() without importing it, throwing 'ReferenceError: isDiepXuanEnabled is not defined' on every provider model fetch (logged as 'Error fetching models'). Add the same flags import used by sibling contextLength modules. * docs(checklist): ghi nhận fix import isDiepXuanEnabled trong contextLength/cache.js Bổ sung mục 13 (Auto Context Length) và cập nhật bảng mục 11 theo quy tắc changelog fork: mô tả triệu chứng, nguyên nhân, fix, bài học và verify. * feat(agnes): add Agnes AI provider (fork-layer registry) Add Agnes AI (Sapiens AI), an OpenAI-compatible multimodal gateway. Base URL https://apihub.agnes-ai.com/v1, apikey Bearer auth. Models verified live via GET /v1/models + real calls (2026-07-23): - agnes-2.0-flash text/vision POST /v1/chat/completions (200 OK) - agnes-image-2.0-flash image POST /v1/images/generations (200 OK) - agnes-image-2.1-flash image (listed live) - agnes-1.5-flash omitted (503 model_not_found) - agnes-video-v2.0 deferred (async shape needs dedicated executor) Fork-layer approach (huong 2, AGENTS section 6): provider logic lives in open-sse/diepxuan/registry/agnes.js; base touched minimally at the two required merge points: - registry/index.js: import d1 (dN namespace avoids upstream pN renumber) - imageProviders/index.js: register agnes OpenAI-compatible image adapter Add provider icon public/providers/agnes.png (128x128, official logo mark extracted from platform favicon.ico). Document in CUSTOM-FEATURES-MERGE-CHECKLIST section 19.
Add 5 keys to public/i18n/literals/vi.json: - Group models under one name... - Fallback, Round Robin, Fusion, Capacity auto-switch descriptions Mechanism: runtime i18n (src/i18n/runtime.js) reads vi.json as exact-match translation map; locale=vi users see translated text, locale=en falls back to upstream English. No base file touched (combos/page.js stays untouched); zero merge conflict risk on upstream rebase. Verify: - python3 -m json.tool vi.json: valid JSON - node scripts/diepxuan/check-custom-features.mjs: 360 PASS / 0 WARN / 0 FAIL - 5/5 keys match base file text exactly (incl. em-dash) Docs: docs/CUSTOM-FEATURES-MERGE-CHECKLIST.md §20.
Sếp yêu cầu trực tiếp: 'Round Robin' không dịch thành 'Vòng tròn'
(nghĩa đen, không đúng kỹ thuật). Bản dịch đúng trong ngữ cảnh
load balancing / scheduling là 'Luân phiên' (round-robin scheduling).
Changes:
- public/i18n/literals/vi.json:
* key 'Round Robin': 'Vòng tròn' -> 'Luân phiên' (fix chuẩn kỹ thuật)
* long-form key value: dùng 'Luân phiên — xoay vòng model...' thay vì lặp
'Round Robin — luân phiên model...'
* +3 keys mới cho STRATEGY_OPTIONS modal:
- 'Round Robin — rotate' -> 'Luân phiên — xoay vòng'
- 'Fallback — try in order' -> 'Fallback — thử theo thứ tự'
- 'Fusion — panel + judge' -> 'Fusion — panel + judge'
- docs/CUSTOM-FEATURES-MERGE-CHECKLIST.md §20: rev 2, bảng quyết định dịch,
smoke test mở rộng (modal strategy dropdown + ConnectionsCard).
Verify:
- python3 -m json.tool: JSON hợp lệ
- 201 keys, không trùng lặp
- node scripts/diepxuan/check-custom-features.mjs: 360 PASS / 0 WARN / 0 FAIL
- 'Round Robin' key giờ áp dụng cho 2 chỗ (combos bullet + ConnectionsCard)
PR #50: i18n(vi) — dịch phần giải thích Combos sang tiếng Việt (rev 2). Conflicts resolved: - docs/CUSTOM-FEATURES-MERGE-CHECKLIST.md: giữ HEAD (ghi chú fix import + bug fix section từ §13) + thêm §20 từ PR #50. Không xóa marker script rule (line 452 chỉ là docstring về marker, không phải marker). - open-sse/diepxuan/contextLength/cache.js: giữ HEAD (đã có isDiepXuanEnabled import fix từ PR #49). Cả 2 nhánh đều có cùng nội dung 178 dòng — chỉ khác conflict marker. Verify: - 360 PASS / 0 WARN / 0 FAIL (custom-features check) - node --check cache.js PASS - python3 -m json.tool public/i18n/literals/vi.json OK - 20 sections trong CHECKLIST (giữ §19 Agnes + thêm §20 i18n)
Bring PR #49 fix-import into local diepxuan branch before pushing the i18n merge (#50). Conflict in CHECKLIST is benign: local already has §20 i18n after the previous merge of task/i18n-combos-vi, so just drop markers and keep HEAD content. Verify (after both merges): - 360 PASS / 0 WARN / 0 FAIL - 20 sections in CHECKLIST (§13-§20) - vi.json 201 keys, JSON valid
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.
Tổng quan
Branch
diepxuanbase từorigin/main(v0.5.40, 79918c7), gom các custom feature của forkdiepxuan/9routerchưa được merge vào main.Đợt 2 (2026-07-22): sync docs/manifest + wrap hooks + xóa dead code
6 commit mới trên đỉnh
2f447c06:0995bd9e docs(TOOLS): note that npm run build must run outside Codex sandbox46da85e7 docs(CHECKLIST): sync with current fork state, add NVIDIA + v1 models sectionsfe58aa98 chore(manifest): add auto-context-length, drop stale nvidia-executor-stripfe747a87 chore(fork): drop dead-code files (executorHooks + console-logs-structured)fe2a1123 feat(fork): wrap contextLength hooks with isDiepXuanEnabled()b558622a feat(fork): wrap codex subagent config with isDiepXuanEnabled()Tổng đợt 2: 10 file thay đổi (+317 / -235, trong đó 2 file delete).
Verify sau đợt 2
node --checktoàn bộ file wrap + delete: PASS.node scripts/diepxuan/check-custom-features.mjs: 360 PASS / 0 WARN / 0 FAIL (14 features).npm run build(ngoài sandbox, saunpm installcòn thiếu@next/third-parties): PASS.Known issues #1 đã fix
Manifest rule
fork-branding-headerstale → đã bỏforbiddenFiles, chỉ giữforbiddenPatterns(Header không importDonateModal). Cho phép upstream thêm lại file nếu cần.Dead code đã xóa
open-sse/diepxuan/executorHooks.js(37 dòng, NVIDIA strip helper, không ai import)src/diepxuan/app/api/console-logs-structured/route.js(159 dòng, structured log API route,EnhancedConsoleLog.jsxkhông dùng)Đã xác nhận xóa 2 file này không ảnh hưởng đến enhanced-console-log feature (đã grep trước khi xóa).
Hook wrap mới
open-sse/diepxuan/contextLength/{index,cache,modelsApi,errorParser}.js: khiDIEPXUAN_ENABLED=false, context_length lookup + cache + API fetch + error parsing thành no-op./v1/modelstrả response không cócontext_length, giống upstream.src/diepxuan/app/dashboard/cli-tools/codex.js: khiDIEPXUAN_ENABLED=false,extendCodexSubagentConfig()trả config gốc (không extenddescription).Đợt 1 (PR body gốc — giữ audit trail)
Phạm vi đợt 1
2f447c06), 54 file thay đổi, +4430 / -119.src/diepxuan/,open-sse/diepxuan/).Nhóm thay đổi chính (đợt 1)
current origin endpointcho 9 tool + codex subagent description, hook vàoToolDetailClient.js+ 8 file*ToolCard.jsx.EnhancedConsoleLog.jsx+ structured log API (đợt 2 xóa route dead code).comboFailTracker,webComboFallback, hook vàosearch.js/fetch.js/combo.js/accountFallback.js/stream.js/settings/route.js.open-sse/diepxuan/contextLength/(cache + errorParser + modelsApi).dev.sh(242 dòng),.github/workflows/build-and-deploy.yml.docs/CUSTOM-FEATURES-MERGE-CHECKLIST.md+docs/custom-features.manifest.json.Verify (cộng dồn 2 đợt)
node --checkpass toàn bộ file fork + base files bị sửa.node scripts/diepxuan/check-custom-features.mjs360 PASS / 0 WARN / 0 FAIL.src/diepxuan/,open-sse/diepxuan/).docs/CUSTOM-FEATURES-MERGE-CHECKLIST.mdđã sync với state hiện tại.docs/custom-features.manifest.jsonđã sync (14 features).npm run buildPASS (ngoài sandbox, saunpm install).Known issues còn lại (theo dõi)
diepxuankhông theo conventiontask/<short-desc>— đề xuất giữ cho đợt này, từ đợt sau áp dụng convention.tests/unit/{combo-immediate-fallback-node.test.mjs,diepxuan-feature-flags.test.js}) chưa chạy được trong sandbox — cần môi trường cóvitestcài sẵn.Reviewer: @diepxuan