Skip to content

feat: Add user preferences feature with Markdown storage#32146

Open
cola0908 wants to merge 1 commit into
anomalyco:devfrom
cola0908:feat/user-preferences
Open

feat: Add user preferences feature with Markdown storage#32146
cola0908 wants to merge 1 commit into
anomalyco:devfrom
cola0908:feat/user-preferences

Conversation

@cola0908

@cola0908 cola0908 commented Jun 13, 2026

Copy link
Copy Markdown

Issue for this PR

Closes #32145

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

Adds a user preferences feature that stores preferences in Markdown format (~/.config/opencode/preferences.md) and automatically injects them into the system prompt sent to AI models.

Changes:

  • New Preference service module for reading/writing preferences
  • CLI commands: opencode preference <path|show|edit|reset>
  • Desktop Settings dialog: new "Preferences" tab with Markdown editor
  • TUI: /preferences command in command palette
  • Global API endpoints: GET/PUT /global/preferences
  • System prompt integration in session initialization

How did you verify your code works?

  • Ran bun typecheck in all affected packages (opencode, app, tui)
  • Manually tested CLI commands work correctly
  • Verified API endpoints respond correctly
  • Tested Desktop and TUI UI components render properly

Screenshots / recordings

N/A - This is primarily a backend/CLI feature with simple UI components

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

- Add Preference service module for reading/writing preferences.md
- Add CLI commands: opencode preference <path|show|edit|reset>
- Add Desktop settings tab with Markdown editor for preferences
- Add TUI /preferences command for preference management
- Add global API endpoints GET/PUT /global/preferences
- Integrate preferences into system prompt during session initialization
- Store preferences in ~/.config/opencode/preferences.md

Closes anomalyco#32145
@github-actions github-actions Bot added needs:compliance This means the issue will auto-close after 2 hours. and removed needs:compliance This means the issue will auto-close after 2 hours. labels Jun 13, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Thanks for updating your PR! It now meets our contributing guidelines. 👍

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.

[功能请求]: 添加用户偏好功能,支持自定义 AI 交互方式

1 participant