feat: add personality module with IDENTITY.md / SOUL.md / USER.md support#4355
Open
HHHEEEWWW wants to merge 5 commits into
Open
feat: add personality module with IDENTITY.md / SOUL.md / USER.md support#4355HHHEEEWWW wants to merge 5 commits into
HHHEEEWWW wants to merge 5 commits into
Conversation
…port Add a personality module that loads three markdown files (IDENTITY.md, SOUL.md, USER.md) from .reasonix/personality/ and folds them into the system prompt to shape the agent's identity, behaviour, and user awareness. Backend (Go): - New internal/personality/ package: Load, Compose, ReadFile, WriteFile, DeleteFile, List, ProjectDirs - PersonalityConfig with Enabled toggle in config.Config - Integrated in boot.go: loads personality after output style, before memory/skills, when [personality] enabled = true - Desktop settings API: 5 new bound methods - Default: disabled (backward compatible) Frontend (TypeScript/React): - New 'personality' tab in SettingsPanel with enable toggle and three-file editor (IDENTITY.md / SOUL.md / USER.md) - PersonalityFileView and PersonalitySettingsView types - Full bridge bindings + mock implementation for browser dev mode - Locale keys added to en.ts, zh.ts, zh-TW.ts Change: ErrorBoundary now renders crash details instead of null (blank page) for easier debugging. Template examples in docs/personality-templates/.
- Run gofmt -w on desktop/settings_app.go, internal/boot/boot.go, internal/config/config.go to fix formatting - Change Load() to first-wins (project overrides home dir) - Fix tests to be Windows-path agnostic (use filepath.Join, HasPrefix, HasSuffix instead of hardcoded / separators) - Update Load() doc comment to reflect first-wins behavior
Contributor
Author
|
Sorry, I messed up and I don't know what happened. It prompted me that there was a conflict between the two versions, and GitHub couldn't verify which one was accurate. So I merged the two, which resulted in many CI validation failures. The first version that passed validation was the most direct, clear, and pure version I submitted. I hope to adopt some of the code and have the repository developer add this agent soul feature to give the agent a soul and emotion. |
Contributor
Author
|
so,who can help me complete this 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.
新增:人格模块(Personality Module)
为 Reasonix 增加完整的人格模块,允许用户通过三个 Markdown 文件(IDENTITY.md、SOUL.md、USER.md)自定义 Agent 的身份认同、行为风格和用户认知。
架构
后端(Go)
internal/personality/— 新包,提供 Load()、Compose()、ReadFile/WriteFile/DeleteFile、List、ProjectDirsinternal/config/config.go— 新增 PersonalityConfig(Enabled bool)字段,PersonalityEnabled() 方法internal/boot/boot.go— 在 output style 之后、memory/skills 之前加载人格,默认关闭desktop/settings_app.go— 新增 5 个绑定方法reasonix.example.toml— 添加 [personality] 配置示例前端(TypeScript/React)
附带修复
向后兼容
改动文件