Files
it-tools/src/tools/explainshell/index.ts
T
Sebastian DanielssonandClaude Opus 5.5 4a80283786 feat(settings): add an offline mode that hides internet-only tools
"offline": true in tools-settings.json hides tools that need internet
access (menus and routes). Tools declare it with requiresInternet, either
always or unless an intranet mirror is configured. The settings helper
lives in a module without top-level await so eagerly loaded tool
index.ts files can use it without delaying app boot.

Refs sharevb/it-tools#571

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-25 18:51:17 +01:00

17 lines
685 B
TypeScript

import { translate as t } from '@/plugins/i18n.plugin';
import { defineTool } from '../tool';
import { getToolsSettingString } from '@/utils/tools-settings';
export const tool = defineTool({
name: t('tools.explainshell.title'),
path: '/explainshell',
description: t('tools.explainshell.description'),
keywords: ['explain', 'shell'],
component: () => import('./explainshell.vue'),
icon: defineAsyncComponent(() => import('@vicons/tabler/es/Terminal2')),
createdAt: new Date('2026-01-30'),
category: 'Data',
externAccessDescription: t('tools.explainshell.externalAccess'),
requiresInternet: (settings) => !getToolsSettingString(settings, 'explainchain', 'url'),
});