mirror of
https://github.com/langgenius/dify.git
synced 2026-05-03 17:08:03 +08:00
refactor(core): simplify role handling and improve usability
- Replaced explicit string usage with `CreatedByRole` enum for better maintainability. - Removed duplicate `CreatedByRole` class definition, improving codebase consistency. - Increased file number limits from 6 to 10 to allow more file uploads. - Transitioned `AppMode` to a string enum for consistent type usage. - Refactored `extract_thread_messages` function argument for flexibility. - Removed file extension limitation in file service to support custom extensions. - Improved enum import statements across multiple modules for clarity and consistency.
This commit is contained in:
@ -72,7 +72,7 @@ class TokenBufferMemory:
|
||||
files = db.session.query(MessageFile).filter(MessageFile.message_id == message.id).all()
|
||||
if files:
|
||||
file_extra_config = None
|
||||
if self.conversation.mode not in {AppMode.ADVANCED_CHAT.value, AppMode.WORKFLOW.value}:
|
||||
if self.conversation.mode not in {AppMode.ADVANCED_CHAT, AppMode.WORKFLOW}:
|
||||
file_extra_config = FileUploadConfigManager.convert(self.conversation.model_config)
|
||||
else:
|
||||
if message.workflow_run_id:
|
||||
|
||||
Reference in New Issue
Block a user