Improve local evidence search and AI capabilities
This commit is contained in:
@@ -13,30 +13,39 @@ export function createSidebarPageAiSkillRuntime(context) {
|
||||
|
||||
function pageAiSkillSourceOptions() {
|
||||
var options = [
|
||||
{ value: 'mnote', group: 'mnote', label: 'mnote', profile: '' },
|
||||
{ value: 'reasonix', group: 'reasonix', label: 'reasonix', profile: '' }
|
||||
{ value: 'mnote', group: 'mnote', label: 'MNote 公共能力', profile: '' },
|
||||
{ value: 'reasonix', group: 'reasonix', label: 'Reasonix skill(查看)', profile: '', readonly: true }
|
||||
];
|
||||
pageAiNormalizeArray(pageUiState.pageAiProfiles).forEach(function(profile) {
|
||||
var profileId = pageAiProfileValue(profile);
|
||||
if (!profileId) return;
|
||||
var label = profile.kind === 'shared'
|
||||
? (profile.baseProfile === 'lite' || profileId === 'shared_lite' ? 'hermes_lite' : 'Hermes_shared')
|
||||
: 'Hermes_user';
|
||||
var alias = String(profile.alias || '').trim();
|
||||
if (!profileId || pageAiProfileIsChatOnlySkillSource(profile)) return;
|
||||
var label = profile.kind === 'shared' ? 'Hermes 共享 skill(查看)' : 'Hermes skill(查看)';
|
||||
var alias = String(profile.alias || profile.displayName || '').trim();
|
||||
options.push({
|
||||
value: 'hermes:' + profileId,
|
||||
group: 'hermes',
|
||||
profile: profileId,
|
||||
label: alias && alias !== label ? label + ' · ' + alias : label,
|
||||
readonly: profile.readonly === true
|
||||
readonly: true
|
||||
});
|
||||
});
|
||||
return options;
|
||||
}
|
||||
|
||||
function pageAiProfileIsChatOnlySkillSource(profile) {
|
||||
var profileId = String(pageAiProfileValue(profile) || '').trim().toLowerCase();
|
||||
var baseProfile = String(profile && profile.baseProfile || '').trim().toLowerCase();
|
||||
var label = String(profile && (profile.displayName || profile.alias || profile.name) || '').trim().toLowerCase();
|
||||
var providerKind = String(profile && profile.providerKind || '').trim().toLowerCase();
|
||||
return profileId.indexOf('chat') >= 0
|
||||
|| baseProfile.indexOf('chat') >= 0
|
||||
|| label.indexOf('chat') >= 0
|
||||
|| providerKind.indexOf('chat') >= 0
|
||||
|| profileId === 'shared_lite'
|
||||
|| baseProfile === 'lite';
|
||||
}
|
||||
|
||||
function pageAiDefaultSkillSource() {
|
||||
if (pageAiCurrentAgentId() === 'hermes') return 'hermes:' + pageAiCurrentProfile();
|
||||
if (pageAiCurrentAgentId() === 'reasonix') return 'reasonix';
|
||||
return 'mnote';
|
||||
}
|
||||
|
||||
@@ -172,21 +181,29 @@ export function createSidebarPageAiSkillRuntime(context) {
|
||||
group: group,
|
||||
profile: profile || '',
|
||||
category: category.name,
|
||||
categoryTitle: skill.categoryTitle || category.title || category.name || '',
|
||||
id: id,
|
||||
name: skill.name || id,
|
||||
title: skill.title || skill.name || id,
|
||||
description: skill.description || '',
|
||||
enabled: group === 'hermes' ? skill.enabled !== false : (skill.enabled !== false && overrides[id] !== false),
|
||||
toggleable: skill.toggleable !== false,
|
||||
enabled: group === 'mnote' ? (skill.enabled !== false && overrides[id] !== false) : skill.enabled !== false,
|
||||
toggleable: group === 'mnote' && skill.toggleable !== false,
|
||||
source: skill.source || group,
|
||||
origin: skill.origin || '',
|
||||
readOnly: skill.readOnly === true || skill.readonly === true || skill.configurable === false,
|
||||
readOnly: group !== 'mnote' || skill.readOnly === true || skill.readonly === true || skill.configurable === false,
|
||||
builtin: pageAiSkillIsBuiltin(skill),
|
||||
configurable: skill.configurable !== false,
|
||||
configScope: skill.configScope || '',
|
||||
skillKind: skill.skillKind || '',
|
||||
profileId: skill.profileId || '',
|
||||
toolNames: skill.toolNames || [],
|
||||
tools: skill.tools || [],
|
||||
toolCount: Number(skill.toolCount || 0),
|
||||
disabledToolCount: Number(skill.disabledToolCount || 0),
|
||||
status: skill.status || '',
|
||||
capabilityId: skill.capabilityId || '',
|
||||
capabilityKind: skill.capabilityKind || '',
|
||||
uiKind: skill.uiKind || '',
|
||||
requiresContextRefs: skill.requiresContextRefs || []
|
||||
});
|
||||
});
|
||||
@@ -198,21 +215,29 @@ export function createSidebarPageAiSkillRuntime(context) {
|
||||
group: group,
|
||||
profile: profile || '',
|
||||
category: 'archived',
|
||||
categoryTitle: skill.categoryTitle || 'archived',
|
||||
id: id,
|
||||
name: skill.name || id,
|
||||
title: skill.title || skill.name || id,
|
||||
description: skill.description || '',
|
||||
enabled: group === 'hermes' ? skill.enabled !== false : (skill.enabled !== false && overrides[id] !== false),
|
||||
toggleable: skill.toggleable !== false,
|
||||
enabled: group === 'mnote' ? (skill.enabled !== false && overrides[id] !== false) : skill.enabled !== false,
|
||||
toggleable: group === 'mnote' && skill.toggleable !== false,
|
||||
source: skill.source || group,
|
||||
origin: skill.origin || '',
|
||||
readOnly: skill.readOnly === true || skill.readonly === true || skill.configurable === false,
|
||||
readOnly: group !== 'mnote' || skill.readOnly === true || skill.readonly === true || skill.configurable === false,
|
||||
builtin: pageAiSkillIsBuiltin(skill),
|
||||
configurable: skill.configurable !== false,
|
||||
configScope: skill.configScope || '',
|
||||
skillKind: skill.skillKind || '',
|
||||
profileId: skill.profileId || '',
|
||||
toolNames: skill.toolNames || [],
|
||||
tools: skill.tools || [],
|
||||
toolCount: Number(skill.toolCount || 0),
|
||||
disabledToolCount: Number(skill.disabledToolCount || 0),
|
||||
status: skill.status || '',
|
||||
capabilityId: skill.capabilityId || '',
|
||||
capabilityKind: skill.capabilityKind || '',
|
||||
uiKind: skill.uiKind || '',
|
||||
requiresContextRefs: skill.requiresContextRefs || []
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user