fix: correct Settings actions in Laya ready state and clear stale AI warning (#12)
Offer the right actions in Settings when Laya is ready/available instead of leaving irrelevant ones, and stop showing the ChannelList local-AI warning once the runtime is actually available. Derive both from layaStatusPresentation and cover the ready/available action set with tests. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@ -77,5 +77,13 @@
|
||||
};
|
||||
}
|
||||
|
||||
return { presentLayaStatus };
|
||||
function channelListWarning(mode, status = {}, batchFailed = false) {
|
||||
if (mode === 'algo') return '';
|
||||
if (batchFailed || status.modelPresent !== true || status.runtimeAvailable !== true) {
|
||||
return 'Local AI service is unavailable. Standard channel matching is being used.';
|
||||
}
|
||||
return '';
|
||||
}
|
||||
|
||||
return { channelListWarning, presentLayaStatus };
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user