@eclipse-docks/extension-ai-system 0.8.3 → 0.8.5
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/api.js +1 -86
- package/dist/{cognitive-extension-CvP05Bw_.js → cognitive-extension-DAP_yD5Y.js} +2 -2
- package/dist/{cognitive-extension-CvP05Bw_.js.map → cognitive-extension-DAP_yD5Y.js.map} +1 -1
- package/dist/index.js +1 -1
- package/dist/runtime/cognitive-runtime.d.ts.map +1 -1
- package/dist/runtime/skills.d.ts +2 -0
- package/dist/runtime/skills.d.ts.map +1 -1
- package/dist/runtime/specialists/index.d.ts +1 -0
- package/dist/runtime/specialists/index.d.ts.map +1 -1
- package/dist/{runtime-DVzLyx8h.js → runtime-CI4JObpD.js} +124 -18
- package/dist/runtime-CI4JObpD.js.map +1 -0
- package/package.json +1 -1
- package/dist/api.js.map +0 -1
- package/dist/runtime-DVzLyx8h.js.map +0 -1
package/dist/api.js
CHANGED
|
@@ -1,87 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
//#region src/runtime/skills-select.ts
|
|
3
|
-
/**
|
|
4
|
-
* Catalog-only prompt section. The model loads full skill bodies via skills.load.
|
|
5
|
-
*/
|
|
6
|
-
function formatSkillsPromptSection(skills) {
|
|
7
|
-
if (!skills.length) return "";
|
|
8
|
-
return ["Available skills (call skills.load with the skill name to load full instructions before relying on them):", skills.map((skill) => `- ${skill.name}: ${(skill.description ?? "").trim() || skill.label}`).join("\n")].join("\n");
|
|
9
|
-
}
|
|
10
|
-
/** @deprecated Prefer skills.load; kept for tests/helpers that still filter by goal. */
|
|
11
|
-
function selectRelevantSkills(skills, ctx) {
|
|
12
|
-
return skills.filter((skill) => {
|
|
13
|
-
if (skill.relevant) return skill.relevant(ctx);
|
|
14
|
-
return skillMatchesGoal(skill, ctx.goal);
|
|
15
|
-
});
|
|
16
|
-
}
|
|
17
|
-
var STOP_WORDS = /* @__PURE__ */ new Set([
|
|
18
|
-
"that",
|
|
19
|
-
"this",
|
|
20
|
-
"with",
|
|
21
|
-
"from",
|
|
22
|
-
"your",
|
|
23
|
-
"have",
|
|
24
|
-
"when",
|
|
25
|
-
"into",
|
|
26
|
-
"call",
|
|
27
|
-
"file",
|
|
28
|
-
"files",
|
|
29
|
-
"default",
|
|
30
|
-
"export",
|
|
31
|
-
"write",
|
|
32
|
-
"using",
|
|
33
|
-
"such",
|
|
34
|
-
"does",
|
|
35
|
-
"send",
|
|
36
|
-
"open",
|
|
37
|
-
"name",
|
|
38
|
-
"they",
|
|
39
|
-
"them",
|
|
40
|
-
"then",
|
|
41
|
-
"than",
|
|
42
|
-
"also",
|
|
43
|
-
"only",
|
|
44
|
-
"over",
|
|
45
|
-
"under",
|
|
46
|
-
"about",
|
|
47
|
-
"after",
|
|
48
|
-
"before",
|
|
49
|
-
"other",
|
|
50
|
-
"which",
|
|
51
|
-
"where",
|
|
52
|
-
"whose",
|
|
53
|
-
"their",
|
|
54
|
-
"there",
|
|
55
|
-
"these",
|
|
56
|
-
"those",
|
|
57
|
-
"and",
|
|
58
|
-
"for",
|
|
59
|
-
"the",
|
|
60
|
-
"a",
|
|
61
|
-
"an",
|
|
62
|
-
"to",
|
|
63
|
-
"of",
|
|
64
|
-
"in",
|
|
65
|
-
"on",
|
|
66
|
-
"or",
|
|
67
|
-
"by",
|
|
68
|
-
"is",
|
|
69
|
-
"are",
|
|
70
|
-
"be",
|
|
71
|
-
"as",
|
|
72
|
-
"at",
|
|
73
|
-
"it",
|
|
74
|
-
"do",
|
|
75
|
-
"not"
|
|
76
|
-
]);
|
|
77
|
-
function skillMatchesGoal(skill, goal) {
|
|
78
|
-
const hay = goal.toLowerCase();
|
|
79
|
-
if (!hay.trim()) return false;
|
|
80
|
-
const tokens = `${skill.name} ${skill.label ?? ""} ${skill.description ?? ""}`.toLowerCase().split(/[^a-z0-9._-]+/).filter((token) => token.length >= 4 && !STOP_WORDS.has(token));
|
|
81
|
-
if (!tokens.length) return false;
|
|
82
|
-
return tokens.some((token) => hay.includes(token));
|
|
83
|
-
}
|
|
84
|
-
//#endregion
|
|
1
|
+
import { A as OPEN_AI_SETTINGS_COMMAND, C as listConfiguredModelIds, D as AI_SETTINGS_EDITOR_ID, E as loadModelsCatalog, O as AI_SETTINGS_KEY, S as defaultProvidersSettings, a as listSkillContributions, b as OpenAICompatibleProvider, c as formatSkillsPromptSection, d as resolveSkillBody, f as formatSkillForPrompt, i as SYSTEM_SKILLS, j as TOPIC, k as AI_VIEW_NAME, l as selectRelevantSkills, n as CognitiveRuntime, o as registerSkillMarkdown, p as parseSkillMarkdown, r as cognitiveRuntime, s as isSkillContribution, t as registerSkillCommands, u as resolveSkill, w as parseModelIds, x as fetchOpenAICompatibleModels } from "./runtime-CI4JObpD.js";
|
|
85
2
|
export { AI_SETTINGS_EDITOR_ID, AI_SETTINGS_KEY, AI_VIEW_NAME, CognitiveRuntime, OPEN_AI_SETTINGS_COMMAND, OpenAICompatibleProvider, SYSTEM_SKILLS, TOPIC, cognitiveRuntime, defaultProvidersSettings, fetchOpenAICompatibleModels, formatSkillForPrompt, formatSkillsPromptSection, isSkillContribution, listConfiguredModelIds, listSkillContributions, loadModelsCatalog, parseModelIds, parseSkillMarkdown, registerSkillCommands, registerSkillMarkdown, resolveSkill, resolveSkillBody, selectRelevantSkills };
|
|
86
|
-
|
|
87
|
-
//# sourceMappingURL=api.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { A as OPEN_AI_SETTINGS_COMMAND, D as AI_SETTINGS_EDITOR_ID, O as AI_SETTINGS_KEY, S as defaultProvidersSettings, T as detectEffortCapability, _ as formatTokenCount, g as formatContextPercent, h as formatBucketDetail, j as TOPIC, k as AI_VIEW_NAME, m as estimateSessionContextUsage, r as cognitiveRuntime, t as registerSkillCommands, v as ATTACHMENT_FILE_ACCEPT, w as parseModelIds, x as fetchOpenAICompatibleModels, y as readPromptAttachmentFromFile } from "./runtime-CI4JObpD.js";
|
|
2
2
|
import { DocksPart, File as File$1, FileContentType, SIDEBAR_AUXILIARY, confirmDialog, contributionRegistry, editorRegistry, filebrowserDialog, parseMarkdownHtml, registerAll, rootContext, toastError, toastInfo, workspaceService } from "@eclipse-docks/core";
|
|
3
3
|
import { css, customElement, html, nothing, property, query, state, unsafeHTML } from "@eclipse-docks/core/externals/lit";
|
|
4
4
|
import "@eclipse-docks/core/externals/webawesome";
|
|
@@ -2597,4 +2597,4 @@ registerAll({
|
|
|
2597
2597
|
});
|
|
2598
2598
|
//#endregion
|
|
2599
2599
|
|
|
2600
|
-
//# sourceMappingURL=cognitive-extension-
|
|
2600
|
+
//# sourceMappingURL=cognitive-extension-DAP_yD5Y.js.map
|