UNPKG

@code-yeongyu/senpi

Version:

Coding agent CLI with read, bash, edit, write tools and session management

29 lines • 1.28 kB
import { DefaultResourceLoader } from "../core/resource-loader.js"; /** * Load extensions for their CLI flags and nothing else. * * Help renders flag descriptors, so this deliberately skips every other resource class and the * whole model/session stack that `createAgentSessionServices` would build: skills, prompt * templates, themes and context files cannot register a flag. */ export async function resolveHelpExtensionFlags(options) { const resourceLoader = new DefaultResourceLoader({ cwd: options.cwd, agentDir: options.agentDir, settingsManager: options.settingsManager, additionalExtensionPaths: [...options.additionalExtensionPaths], noExtensions: options.noExtensions, noSkills: true, noPromptTemplates: true, noThemes: true, noContextFiles: true, ...(options.extensionFactories ? { extensionFactories: [...options.extensionFactories] } : {}), }); await resourceLoader.reload(); const { extensions } = resourceLoader.getExtensions(); return { flags: extensions.flatMap((extension) => [...extension.flags.values()]), extensionPaths: extensions.map((extension) => extension.resolvedPath), }; } //# sourceMappingURL=help-extension-flags.js.map