fix(frontend): 空对话与显式新建路由下 has_images/has_videos 不应用残留状态
status 中的值来自 terminal 残留的旧对话上下文,空对话语义上无图片/视频, 直接置 false,否则误拦 handleModelSelect 的图片/视频能力检查。
This commit is contained in:
parent
55e0dcfb4f
commit
8da4a596eb
@ -107,6 +107,7 @@ export const stateMethods = {
|
|||||||
this.imageEntries = [];
|
this.imageEntries = [];
|
||||||
this.imageLoading = false;
|
this.imageLoading = false;
|
||||||
this.conversationHasImages = false;
|
this.conversationHasImages = false;
|
||||||
|
this.conversationHasVideos = false;
|
||||||
this.toolSetSettingsLoading(false);
|
this.toolSetSettingsLoading(false);
|
||||||
this.toolSetSettings([]);
|
this.toolSetSettings([]);
|
||||||
this.pendingToolApprovals = [];
|
this.pendingToolApprovals = [];
|
||||||
|
|||||||
@ -189,11 +189,20 @@ export const resourceMethods = {
|
|||||||
} else {
|
} else {
|
||||||
this.pendingExecutionMode = '';
|
this.pendingExecutionMode = '';
|
||||||
}
|
}
|
||||||
if (status && typeof status.has_images !== 'undefined') {
|
// has_images/has_videos 遵循与上面模型/运行模式相同的权威规则:
|
||||||
this.conversationHasImages = !!status.has_images;
|
// 有打开对话时才从 status 同步;空对话/显式新建路由(/new)上 status 里的值
|
||||||
}
|
// 是 terminal 残留的旧对话上下文,不能应用——空对话语义上无图片/视频,
|
||||||
if (status && typeof status.has_videos !== 'undefined') {
|
// 直接置 false,否则会误拦 handleModelSelect 的图片/视频能力检查。
|
||||||
this.conversationHasVideos = !!status.has_videos;
|
if (hasConversation && !onExplicitNewRoute) {
|
||||||
|
if (status && typeof status.has_images !== 'undefined') {
|
||||||
|
this.conversationHasImages = !!status.has_images;
|
||||||
|
}
|
||||||
|
if (status && typeof status.has_videos !== 'undefined') {
|
||||||
|
this.conversationHasVideos = !!status.has_videos;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
this.conversationHasImages = false;
|
||||||
|
this.conversationHasVideos = false;
|
||||||
}
|
}
|
||||||
const compression = status?.conversation?.compression;
|
const compression = status?.conversation?.compression;
|
||||||
if (compression && typeof compression === 'object') {
|
if (compression && typeof compression === 'object') {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user