@arbidocs/tui 0.4.125 → 0.4.127
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.js +15 -2
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -1946,6 +1946,19 @@ var skillCommands = [
|
|
|
1946
1946
|
if (!skill) {
|
|
1947
1947
|
return `No skill matching "${slug}" in this workspace. Use /skills to list available skills.`;
|
|
1948
1948
|
}
|
|
1949
|
+
if (!skill.doc_ext_id) {
|
|
1950
|
+
if (sub !== "view") {
|
|
1951
|
+
return `/${skill.slug} is a built-in skill (it ships with ARBI) and cannot be edited. Save a skill of your own with the same name to replace it.`;
|
|
1952
|
+
}
|
|
1953
|
+
const lines2 = [colors.textBold(`${skill.name} (${skill.slug})`)];
|
|
1954
|
+
if (skill.description) lines2.push(colors.muted(skill.description));
|
|
1955
|
+
if (skill.arg_hint) lines2.push(colors.muted(`args: ${skill.arg_hint}`));
|
|
1956
|
+
lines2.push(colors.muted(`type: ${skill.skill_type} built-in (ships with ARBI)`));
|
|
1957
|
+
lines2.push("");
|
|
1958
|
+
lines2.push(skill.content ?? "");
|
|
1959
|
+
return lines2;
|
|
1960
|
+
}
|
|
1961
|
+
const docExtId = skill.doc_ext_id;
|
|
1949
1962
|
if (sub === "source") {
|
|
1950
1963
|
return [
|
|
1951
1964
|
colors.textBold(`${skill.name} (${skill.slug})`),
|
|
@@ -1958,9 +1971,9 @@ var skillCommands = [
|
|
|
1958
1971
|
}
|
|
1959
1972
|
const { authHeaders } = ctx;
|
|
1960
1973
|
if (sub === "edit") {
|
|
1961
|
-
return await editSkill(tui, authHeaders, skill);
|
|
1974
|
+
return await editSkill(tui, authHeaders, { ...skill, doc_ext_id: docExtId });
|
|
1962
1975
|
}
|
|
1963
|
-
const dlRes = await sdk.documents.downloadDocument(authHeaders,
|
|
1976
|
+
const dlRes = await sdk.documents.downloadDocument(authHeaders, docExtId);
|
|
1964
1977
|
const body = dlRes.ok ? await dlRes.text() : "";
|
|
1965
1978
|
const lines = [colors.textBold(`${skill.name} (${skill.slug})`)];
|
|
1966
1979
|
if (skill.description) lines.push(colors.muted(skill.description));
|