feat: add Gemini CLI agent platform support (.gemini/skills)

This commit is contained in:
Research Assistant 2026-06-01 19:46:17 +08:00
parent 7ae5126de4
commit 7d4012bf47
9 changed files with 27 additions and 21 deletions

View file

@ -385,7 +385,7 @@ def build_parser() -> argparse.ArgumentParser:
"--agent",
metavar="AGENT",
default="opencode",
choices=["opencode", "cursor", "claude", "codex", "windsurf", "github_copilot", "cline", "augment", "trae"],
choices=["opencode", "cursor", "claude", "codex", "windsurf", "github_copilot", "gemini", "cline", "augment", "trae"],
help="AI Agent platform (default: opencode)",
)
p_setup.add_argument(

File diff suppressed because one or more lines are too long

View file

@ -497,6 +497,7 @@ export class PaperForgeSettingTab extends PluginSettingTab {
cursor: "Cursor",
windsurf: "Windsurf",
github_copilot: "GitHub Copilot",
gemini: "Gemini CLI",
};
const agentDirs: Record<string, string> = {
opencode: ".opencode/skills",
@ -505,6 +506,7 @@ export class PaperForgeSettingTab extends PluginSettingTab {
cursor: ".cursor/skills",
windsurf: ".windsurf/skills",
github_copilot: ".github/skills",
gemini: ".gemini/skills",
};
const vaultPath = (this.app.vault.adapter as any).basePath as string;

View file

@ -1133,6 +1133,7 @@ export class PaperForgeStatusView extends ItemView {
'github_copilot': 'GitHub Copilot',
'windsurf': 'Windsurf',
'codex': 'Codex',
'gemini': 'Gemini CLI',
'cline': 'Cline'
};
const platformName = AGENTS[platformKey] || platformKey;

View file

@ -423,6 +423,7 @@ export class PaperForgeSetupModal extends Modal {
{ key: 'github_copilot', name: 'GitHub Copilot' },
{ key: 'windsurf', name: 'Windsurf' },
{ key: 'codex', name: 'Codex' },
{ key: 'gemini', name: 'Gemini CLI' },
{ key: 'cline', name: 'Cline' },
];
const agentRow = el.createEl('div', { cls: 'paperforge-modal-field' });

View file

@ -10,8 +10,8 @@ import { ACTIONS } from "../src/constants";
import { buildCommandArgs, runSubprocess } from "../src/services/python-bridge";
describe('ACTIONS', () => {
it('has exactly 4 entries', () => {
expect(ACTIONS).toHaveLength(4);
it('has exactly 5 entries', () => {
expect(ACTIONS).toHaveLength(5);
});
it('every entry has id, title, cmd, okMsg', () => {
for (const a of ACTIONS) {

View file

@ -17,6 +17,7 @@ AGENT_SKILL_DIRS: dict[str, str] = {
"cursor": ".cursor/skills",
"windsurf": ".windsurf/skills",
"github_copilot": ".github/skills",
"gemini": ".gemini/skills",
"cline": ".clinerules",
"augment": ".augment/skills",
"trae": ".trae/skills",

View file

@ -43,6 +43,7 @@ AGENT_NAMES = {
"cursor": "Cursor",
"windsurf": "Windsurf",
"github_copilot": "GitHub Copilot",
"gemini": "Gemini CLI",
"cline": "Cline",
"augment": "Augment",
"trae": "Trae",

View file

@ -16,7 +16,7 @@ from .test_contract_helpers import (
class TestPathsJson:
"""Contract: 'paperforge paths --json' returns valid JSON with correct value types."""
REQUIRED_KEYS = {"vault", "worker_script", "pf_deep_script"}
REQUIRED_KEYS = {"vault", "worker_script", "pf_deep_script", "ld_deep_script"}
def test_paths_json_value_semantics(self, cli_invoker):
"""paths --json returns paths with correct value types (all non-empty strings)."""