/**
 * @license
 * Copyright 2025 Vybestack LLC
 * SPDX-License-Identifier: Apache-2.0
 */
import open from 'open';
import process from 'node:process';
import { CommandKind, } from './types.js';
import { MessageType } from '../types.js';
export const docsCommand = {
    name: 'docs',
    description: 'open full LLxprt Code documentation in your browser',
    kind: CommandKind.BUILT_IN,
    action: async (context) => {
        const docsUrl = 'https://github.com/vybestack/llxprt-code/blob/main/docs/index.md';
        if (process.env.SANDBOX && process.env.SANDBOX !== 'sandbox-exec') {
            context.ui.addItem({
                type: MessageType.INFO,
                text: `Please open the following URL in your browser to view the documentation:\n${docsUrl}`,
            }, Date.now());
        }
        else {
            context.ui.addItem({
                type: MessageType.INFO,
                text: `Opening documentation in your browser: ${docsUrl}`,
            }, Date.now());
            await open(docsUrl);
        }
    },
};
//# sourceMappingURL=docsCommand.js.map