Enhance plugin management and course selection features - #42
Conversation
DSH-inspired refactor slice on codex/scut-senior-harness-refactor: - typed PluginRegistry contract in web contracts.ts (agent presets, controlled tools, maintainer skills, course plugin states) - getPluginRegistry() API client for GET /api/v1/plugin-registry - PluginRegistryPanel.vue: dense read-only management surface showing the five agent presets, controlled tools (model_callable=false honesty), material-conversion skill contract metadata, and honest per-course states (active/fixture_only/registered); loading/error states included - App.vue toggle to reveal the panel; styles follow the existing token system and the SOP 4.5 rule that internal admin surfaces prioritize clarity/accessibility over landing-page styling - web 60 tests, typecheck and build passed
- migration 0007 course_plugin_states: explicit unload rows; absence
means loaded (registry default), so pre-0007 DBs behave identically
- repository is_course_plugin_loaded / set_course_plugin_loaded
- service: a course is usable only when its plugin is loaded AND retrieval
serves it; load_course_plugin / unload_course_plugin (audited by user)
- API: POST /api/v1/plugin-registry/courses/{id}/load|unload require real
GitHub login; plugin-registry response adds loaded per course and zeros
enabled_workflows while unloaded
- harness registry: maintainer skills emptied (material-conversion track is
owned externally per SOP 4.5); skill type/registry slot retained
- web: plugin panel becomes interactive with load/unload buttons gated by
login; skills section removed; typed loadCoursePlugin/unloadCoursePlugin
- Python 432 passed; web typecheck + 60 tests + build passed
Design read: dense student product UI (chat + workflow form + admin), audience SCUT students and maintainers, controlled academic-tool language. Dials for this surface: DESIGN_VARIANCE 5, MOTION_INTENSITY 3, VISUAL_DENSITY 6 (reasoned for a product workspace, not the landing baseline). - App.vue restructured into sidebar | main | details columns like the DSH AppFrame: left column holds course/history and attempts, center holds the workflow form, streamed result and plugin management, right details column holds the BYOK credential panel (moved out of the form shell) - CSS grid shell with sticky sidebar/details, explicit collapse at 1120px (details drops below) and 840px (single column); the old .workspace grid had been auto-placing the result into a narrow third column - BYOK panel restyled as a standalone card in the details column - no new motion; existing reduced-motion-gated shimmer/caret/press retained; single accent, token dark mode, focus rings, empty/loading/error states - web typecheck + 60 tests + build passed
- Added new course availability handling with selectable courses. - Introduced retrieval modes and updated course data structure. - Implemented course option labels and selection error messages. - Enhanced markdown rendering for answers, including LaTeX support with KaTeX. - Added tests for course availability and markdown rendering functionalities. - Updated API to fetch course catalogs with improved structure. - Improved UI components to display course selection and answer preferences.
There was a problem hiding this comment.
课程插件化,很好,从DSH架构插件化学到的。everything is a plugin
HKO00O
left a comment
There was a problem hiding this comment.
DSH Cordis?其实关键在于它的适用场景。Paxos 和 Raft 更适合强一致性的场景,比如数据库的主从同步,而 DSH Cordis 则更适合那些对延迟敏感、但又能容忍一定程度数据不一致的场景。举个例子,在实时金融交易系统中,如果每笔交易都要等所有节点确认,那延迟肯定会很高。而 DSH Cordis 可以通过部分节点的快速确认来提升响应速度,同时在后台再逐步同步到其他节点,这样既保证了用户体验,又不会丢失数据。
那具体怎么实现呢?我之前在一个电商项目里试过,效果还不错。首先,我们需要明确系统的容错需求。比如,假设我们有 5 个节点,那么最多能容忍多少个节点宕机?DSH Cordis 的设计里,这个阈值通常设置为 (N-1)/2,其中 N 是节点总数。也就是说,5 个节点的情况下,最多能容忍 2 个节点宕机。这个阈值的设置直接影响了系统的可用性和一致性,需要根据实际业务需求来调整。 这边借鉴下cordis而不是把所有的断言都删掉我觉得是更合理的
There was a problem hiding this comment.
// 不在生成、也没有进行中的打字(历史/初始):直接完整显示。
typedLength.value = target.length;
}
// 不在生成但定时器仍在跑(刚结束):不打断,让它继续打完。
}, 115-119 这边应该会让生成结束直接一泻千里?
这里是我引用的其他人的文章,不是我的经历 |
No description provided.