opencode-gitlab-dap 1.15.0 → 1.15.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +17 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +17 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -4033,14 +4033,28 @@ async function upsertPage(instanceUrl, token, scope, id, slug, content) {
|
|
|
4033
4033
|
function isMarkdownFile(path) {
|
|
4034
4034
|
return path === "SKILL.md" || path.endsWith(".md") || path.endsWith(".markdown");
|
|
4035
4035
|
}
|
|
4036
|
+
function isAgentsGitignored(dir) {
|
|
4037
|
+
try {
|
|
4038
|
+
execSync("git check-ignore -q .agents", { cwd: dir, stdio: "pipe" });
|
|
4039
|
+
return true;
|
|
4040
|
+
} catch {
|
|
4041
|
+
return false;
|
|
4042
|
+
}
|
|
4043
|
+
}
|
|
4036
4044
|
function ensureGitignore(dir) {
|
|
4045
|
+
if (isAgentsGitignored(dir)) return;
|
|
4037
4046
|
const gitignorePath = join2(dir, ".gitignore");
|
|
4038
4047
|
if (existsSync(gitignorePath)) {
|
|
4039
4048
|
const content = readFileSync2(gitignorePath, "utf-8");
|
|
4040
|
-
|
|
4041
|
-
|
|
4049
|
+
writeFileSync(
|
|
4050
|
+
gitignorePath,
|
|
4051
|
+
content.trimEnd() + "\n\n# Agent skills cache (managed by opencode-gitlab-dap)\n.agents/\n"
|
|
4052
|
+
);
|
|
4042
4053
|
} else {
|
|
4043
|
-
writeFileSync(
|
|
4054
|
+
writeFileSync(
|
|
4055
|
+
gitignorePath,
|
|
4056
|
+
"# Agent skills cache (managed by opencode-gitlab-dap)\n.agents/\n"
|
|
4057
|
+
);
|
|
4044
4058
|
}
|
|
4045
4059
|
}
|
|
4046
4060
|
function searchSkillsSh(query) {
|