🐛 fix: Unable to switch to default topic (#10472)

* 修复: 更新话题项编辑状态的条件判断逻辑

* 修复: 修改 Alt+Click 事件处理逻辑以保持当前话题选择

* 修复: 添加 Cerebras 模型提供者的代理 URL 占位符
This commit is contained in:
sxjeru
2025-11-29 13:05:00 +08:00
committed by GitHub
parent 1674cc94f2
commit d181f718c9
2 changed files with 9 additions and 1 deletions
@@ -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+点击在新窗口打开
+3
View File
@@ -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,
},