mirror of
https://github.com/lobehub/lobe-chat.git
synced 2026-06-14 03:30:19 +00:00
🐛 fix: Unable to switch to default topic (#10472)
* 修复: 更新话题项编辑状态的条件判断逻辑 * 修复: 修改 Alt+Click 事件处理逻辑以保持当前话题选择 * 修复: 添加 Cerebras 模型提供者的代理 URL 占位符
This commit is contained in:
+6
-1
@@ -53,7 +53,10 @@ export interface ConfigCellProps {
|
||||
const TopicItem = memo<ConfigCellProps>(({ title, active, id, fav, threadId }) => {
|
||||
const { styles, cx } = useStyles();
|
||||
const toggleConfig = useGlobalStore((s) => s.toggleMobileTopic);
|
||||
const [toggleTopic, editing] = useChatStore((s) => [s.switchTopic, s.topicRenamingId === id]);
|
||||
const [toggleTopic, editing] = useChatStore((s) => [
|
||||
s.switchTopic,
|
||||
s.topicRenamingId !== undefined && s.topicRenamingId === id,
|
||||
]);
|
||||
const activeId = useSessionStore((s) => s.activeId);
|
||||
const [isHover, setHovering] = useState(false);
|
||||
|
||||
@@ -65,6 +68,8 @@ const TopicItem = memo<ConfigCellProps>(({ title, active, id, fav, threadId }) =
|
||||
distribution={'space-between'}
|
||||
horizontal
|
||||
onClick={(e) => {
|
||||
// Alt+Click should keep the current topic selection (reserved shortcut)
|
||||
if (e.altKey) return;
|
||||
// 重命名时不切换话题
|
||||
if (editing) return;
|
||||
// Ctrl/Cmd+点击在新窗口打开
|
||||
|
||||
@@ -9,6 +9,9 @@ const Cerebras: ModelProviderCard = {
|
||||
modelsUrl: 'https://inference-docs.cerebras.ai/models/overview',
|
||||
name: 'Cerebras',
|
||||
settings: {
|
||||
proxyUrl: {
|
||||
placeholder: 'https://api.cerebras.ai/v1',
|
||||
},
|
||||
sdkType: 'openai',
|
||||
showModelFetcher: true,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user