Skip to content

Commit c510a69

Browse files
committed
feat: add Google Gemini CLI adapter with export, run, and import (#33)
Full Gemini CLI adapter: - Export: GEMINI.md + .gemini/settings.json with model, tools, approval mode, hooks - Run: launches gemini CLI in temp workspace (interactive + single-shot) - Import: reads GEMINI.md + settings.json, parses model object format - Hooks mapped: SessionStart, BeforeTool, AfterTool, AfterModel, AfterAgent - Uses shared buildComplianceSection - Comprehensive docs at docs/adapters/gemini.md Fix: import handles model as both string and {id, provider} object Closes #33
1 parent e2a9050 commit c510a69

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/commands/import.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -346,8 +346,11 @@ function importFromGemini(sourcePath: string, targetDir: string): void {
346346

347347
const dirName = basename(sourceDir);
348348

349-
// Determine model from settings.json
350-
const model = settings.model as string | undefined;
349+
// Determine model from settings.json (can be string or { id, provider } object)
350+
const rawModel = settings.model;
351+
const model = typeof rawModel === 'object' && rawModel !== null
352+
? (rawModel as Record<string, string>).id
353+
: rawModel as string | undefined;
351354
const agentYaml: Record<string, unknown> = {
352355
spec_version: '0.1.0',
353356
name: dirName.toLowerCase().replace(/[^a-z0-9-]/g, '-'),

0 commit comments

Comments
 (0)