Skip to content

feat: add systemPrompt field to conversation and project models#106

Merged
chenyme merged 2 commits into
devfrom
project_gem
Jun 2, 2026
Merged

feat: add systemPrompt field to conversation and project models#106
chenyme merged 2 commits into
devfrom
project_gem

Conversation

@chenyme

@chenyme chenyme commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

Summary

Add project mode for conversations. Projects can now be selected from the sidebar, new chats can be created directly inside a project, and each project can define project-level instructions for chat model requests.

Project instructions are layered after platform/model instructions and before request-level format instructions. They apply to chat requests only; image generation, image editing, and other non-chat capabilities are not affected.

Change type

  • Bug fix
  • Feature
  • Documentation
  • Refactor
  • Configuration / deployment
  • Security hardening
  • Other

Affected areas

  • Frontend / UI
  • Backend / API
  • Authentication / authorization
  • Conversations / streaming
  • Files / RAG / extraction
  • Model routing / providers
  • MCP / tools
  • Billing / payments
  • Admin console
  • Deployment / Docker / configuration
  • Documentation

Verification

  • cd backend && go test ./...
  • cd backend && make swagger
  • cd frontend && pnpm lint
  • cd frontend && pnpm build
  • git diff --check

Screenshots, API examples, or logs

N/A

Configuration, migration, and compatibility notes

  • Adds system_prompt to chat_conversation_projects through startup migration.
  • Updates conversation project API request/response contracts with systemPrompt.
  • Regenerated Swagger docs are included.
  • Existing projects default to an empty project prompt.
  • Project instructions only affect chat model requests and are not injected into image generation or image editing flows.

Documentation

  • Documentation is not needed for this change.
  • Documentation was updated.
  • Documentation still needs to be updated.

Security and privacy

  • No secrets, tokens, credentials, local config, or personal data are included.
  • User data access remains scoped by authenticated user context unless an admin-only path explicitly requires broader access.
  • Security-sensitive behavior was reviewed, including authentication, authorization, provider routing, file processing, billing, and admin APIs where relevant.

Checklist

  • I searched existing issues and pull requests.
  • Changes are focused and do not include unrelated refactors.
  • Tests or static verification were run where practical.
  • User-facing behavior, deployment steps, API contracts, or configuration changes are documented.
  • Generated artifacts are included only when this project explicitly requires them.
  • Caches, build output, .pyc files, .env files, and local storage data are not committed.

@chenyme chenyme linked an issue Jun 2, 2026 that may be closed by this pull request
3 tasks
@chenyme
chenyme merged commit e11cc0b into dev Jun 2, 2026
4 checks passed
@chenyme
chenyme deleted the project_gem branch June 2, 2026 13:15
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.

[Feature]: 项目功能增强

1 participant