mirror of
https://github.com/rohitg00/skillkit.git
synced 2026-11-20 12:23:29 +00:00
* feat: add TUI enhancements and monorepo structure - Add Translate screen for cross-agent skill translation - Add Context screen for project context management - Add Recommend screen with smart skill recommendations - Fix TUI screen duplication by using fixed height container - Clean up unnecessary comments following code-simplifier principles - Refactor to monorepo structure with @skillkit/core, @skillkit/cli, @skillkit/tui, and @skillkit/agents packages - Add comprehensive tests for translator, context, and recommend features - Update license to Apache-2.0 - Add CONTRIBUTING.md with contribution guidelines * ci: switch from npm to pnpm for monorepo support * ci: use pnpm version from package.json * fix: remove unused import in TUI helpers
65 lines
2.1 KiB
TypeScript
65 lines
2.1 KiB
TypeScript
// Re-export commonly used functions with proper adapters
|
|
import {
|
|
loadConfig,
|
|
getSearchDirs as coreGetSearchDirs,
|
|
getInstallDir as coreGetInstallDir,
|
|
getAgentConfigPath as coreGetAgentConfigPath,
|
|
initProject as coreInitProject,
|
|
loadSkillMetadata as coreLoadSkillMetadata,
|
|
saveSkillMetadata as coreSaveSkillMetadata,
|
|
} from '@skillkit/core';
|
|
import { getAdapter, detectAgent } from '@skillkit/agents';
|
|
import type { AgentType, AgentAdapterInfo } from '@skillkit/core';
|
|
|
|
// Re-export metadata functions directly (they don't need adapter bridging)
|
|
export const loadSkillMetadata = coreLoadSkillMetadata;
|
|
export const saveSkillMetadata = coreSaveSkillMetadata;
|
|
|
|
export function getSearchDirs(agentType?: AgentType): string[] {
|
|
const type = agentType || loadConfig().agent;
|
|
const adapter = getAdapter(type);
|
|
const adapterInfo: AgentAdapterInfo = {
|
|
type: adapter.type,
|
|
name: adapter.name,
|
|
skillsDir: adapter.skillsDir,
|
|
configFile: adapter.configFile,
|
|
};
|
|
return coreGetSearchDirs(adapterInfo);
|
|
}
|
|
|
|
export function getInstallDir(global = false, agentType?: AgentType): string {
|
|
const type = agentType || loadConfig().agent;
|
|
const adapter = getAdapter(type);
|
|
const adapterInfo: AgentAdapterInfo = {
|
|
type: adapter.type,
|
|
name: adapter.name,
|
|
skillsDir: adapter.skillsDir,
|
|
configFile: adapter.configFile,
|
|
};
|
|
return coreGetInstallDir(adapterInfo, global);
|
|
}
|
|
|
|
export function getAgentConfigPath(agentType?: AgentType): string {
|
|
const type = agentType || loadConfig().agent;
|
|
const adapter = getAdapter(type);
|
|
const adapterInfo: AgentAdapterInfo = {
|
|
type: adapter.type,
|
|
name: adapter.name,
|
|
skillsDir: adapter.skillsDir,
|
|
configFile: adapter.configFile,
|
|
};
|
|
return coreGetAgentConfigPath(adapterInfo);
|
|
}
|
|
|
|
export async function initProject(agentType?: AgentType): Promise<void> {
|
|
const type = agentType || (await detectAgent());
|
|
const adapter = getAdapter(type);
|
|
const adapterInfo: AgentAdapterInfo = {
|
|
type: adapter.type,
|
|
name: adapter.name,
|
|
skillsDir: adapter.skillsDir,
|
|
configFile: adapter.configFile,
|
|
};
|
|
return coreInitProject(type, adapterInfo);
|
|
}
|