mirror of
https://github.com/qingchencloud/clawpanel.git
synced 2026-06-02 14:20:10 +08:00
chore: release v0.15.1
This commit is contained in:
@@ -11,7 +11,7 @@ import { t, getLang, setLang, getAvailableLangs } from '../lib/i18n.js'
|
||||
import { isFeatureAvailable } from '../lib/feature-gates.js'
|
||||
import { getKernelSnapshot } from '../lib/kernel.js'
|
||||
import { triggerKernelUpgrade } from '../lib/kernel-upgrade.js'
|
||||
import { getActiveEngine, getActiveEngineId, listEngines, switchEngine, onEngineChange } from '../lib/engine-manager.js'
|
||||
import { getActiveEngine, getActiveEngineId, listEngines, needsInitialEngineChoice, isEngineSetupDeferred, switchEngine, onEngineChange } from '../lib/engine-manager.js'
|
||||
|
||||
// 当用户点 "暂时不升级" 时,本地会话内不再显示升级提示
|
||||
const SS_DISMISSED_KERNEL_UPGRADE = 'clawpanel_kernel_upgrade_dismissed'
|
||||
@@ -83,6 +83,23 @@ function NAV_ITEMS_SETUP() { return [
|
||||
}
|
||||
] }
|
||||
|
||||
function NAV_ITEMS_ENGINE_SELECT() { return [
|
||||
{
|
||||
section: '',
|
||||
items: [
|
||||
{ route: '/engine-select', label: t('engine.choiceNav'), icon: 'setup' },
|
||||
{ route: '/assistant', label: t('sidebar.assistant'), icon: 'assistant' },
|
||||
]
|
||||
},
|
||||
{
|
||||
section: '',
|
||||
items: [
|
||||
{ route: '/settings', label: t('sidebar.settings'), icon: 'settings' },
|
||||
{ route: '/about', label: t('sidebar.about'), icon: 'about' },
|
||||
]
|
||||
}
|
||||
] }
|
||||
|
||||
const ICONS = {
|
||||
setup: '<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M4 19.5A2.5 2.5 0 016.5 17H20"/><path d="M6.5 2H20v20H6.5A2.5 2.5 0 014 19.5v-15A2.5 2.5 0 016.5 2z"/></svg>',
|
||||
dashboard: '<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><rect x="3" y="3" width="7" height="7" rx="1"/><rect x="14" y="3" width="7" height="7" rx="1"/><rect x="3" y="14" width="7" height="7" rx="1"/><rect x="14" y="14" width="7" height="7" rx="1"/></svg>',
|
||||
@@ -190,7 +207,9 @@ export function renderSidebar(el) {
|
||||
|
||||
// 从当前引擎获取菜单(回退到原有逻辑)
|
||||
const engine = getActiveEngine()
|
||||
const navItems = engine ? engine.getNavItems() : (isOpenclawReady() ? NAV_ITEMS_FULL() : NAV_ITEMS_SETUP())
|
||||
const navItems = needsInitialEngineChoice() || isEngineSetupDeferred()
|
||||
? NAV_ITEMS_ENGINE_SELECT()
|
||||
: (engine ? engine.getNavItems() : (isOpenclawReady() ? NAV_ITEMS_FULL() : NAV_ITEMS_SETUP()))
|
||||
|
||||
for (const section of navItems) {
|
||||
html += `<div class="nav-section">
|
||||
|
||||
Reference in New Issue
Block a user