feat: change default assistant name
# Conflicts: # src/renderer/src/i18n/index.ts
This commit is contained in:
parent
3f5c151a11
commit
75c37632d4
@ -44,7 +44,7 @@ const resources = {
|
|||||||
'chat.completion.paused': 'Chat completion paused'
|
'chat.completion.paused': 'Chat completion paused'
|
||||||
},
|
},
|
||||||
assistant: {
|
assistant: {
|
||||||
'default.name': 'Default Assistant',
|
'default.name': '😀 Default Assistant',
|
||||||
'default.description': "Hello, I'm Default Assistant. You can start chatting with me right away",
|
'default.description': "Hello, I'm Default Assistant. You can start chatting with me right away",
|
||||||
'default.topic.name': 'Default Topic',
|
'default.topic.name': 'Default Topic',
|
||||||
'topics.title': 'Topics',
|
'topics.title': 'Topics',
|
||||||
@ -166,7 +166,7 @@ const resources = {
|
|||||||
'chat.completion.paused': '会话已停止'
|
'chat.completion.paused': '会话已停止'
|
||||||
},
|
},
|
||||||
assistant: {
|
assistant: {
|
||||||
'default.name': '默认助手',
|
'default.name': '😃 默认助手 - Assistant',
|
||||||
'default.description': '你好,我是默认助手。你可以立刻开始跟我聊天。',
|
'default.description': '你好,我是默认助手。你可以立刻开始跟我聊天。',
|
||||||
'default.topic.name': '默认话题',
|
'default.topic.name': '默认话题',
|
||||||
'topics.title': '话题',
|
'topics.title': '话题',
|
||||||
|
|||||||
@ -19,7 +19,7 @@ const persistedReducer = persistReducer(
|
|||||||
{
|
{
|
||||||
key: 'cherry-studio',
|
key: 'cherry-studio',
|
||||||
storage,
|
storage,
|
||||||
version: 12,
|
version: 13,
|
||||||
blacklist: ['runtime'],
|
blacklist: ['runtime'],
|
||||||
migrate
|
migrate
|
||||||
},
|
},
|
||||||
|
|||||||
@ -228,6 +228,21 @@ const migrate = createMigrate({
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
// @ts-ignore store type is unknown
|
||||||
|
'13': (state: RootState) => {
|
||||||
|
return {
|
||||||
|
...state,
|
||||||
|
assistants: {
|
||||||
|
...state.assistants,
|
||||||
|
defaultAssistant: {
|
||||||
|
...state.assistants.defaultAssistant,
|
||||||
|
name: ['Default Assistant', '默认助手'].includes(state.assistants.defaultAssistant.name)
|
||||||
|
? i18n.t(`assistant.default.name`)
|
||||||
|
: state.assistants.defaultAssistant.name
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user