@celljs/ta-changes 4.13.0 → 4.13.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/extension/index.mjs +21 -0
- package/package.json +3 -3
package/extension/index.mjs
CHANGED
|
@@ -27,6 +27,27 @@ var TaHostUtil;
|
|
|
27
27
|
});
|
|
28
28
|
}
|
|
29
29
|
TaHostUtil2.reach = reach;
|
|
30
|
+
function marked(systemPrompt, mark) {
|
|
31
|
+
return role(systemPrompt).includes(mark);
|
|
32
|
+
}
|
|
33
|
+
TaHostUtil2.marked = marked;
|
|
34
|
+
function role(systemPrompt) {
|
|
35
|
+
if (!systemPrompt) {
|
|
36
|
+
return "";
|
|
37
|
+
}
|
|
38
|
+
const open = `<addendum>
|
|
39
|
+
`;
|
|
40
|
+
const start = systemPrompt.indexOf(open);
|
|
41
|
+
const context = systemPrompt.indexOf(`<project_context>
|
|
42
|
+
`);
|
|
43
|
+
if (start < 0 || context >= 0 && context < start) {
|
|
44
|
+
return "";
|
|
45
|
+
}
|
|
46
|
+
const end = systemPrompt.indexOf(`
|
|
47
|
+
</addendum>`, start);
|
|
48
|
+
return systemPrompt.slice(start + open.length, end < 0 ? undefined : end);
|
|
49
|
+
}
|
|
50
|
+
TaHostUtil2.role = role;
|
|
30
51
|
})(TaHostUtil || (TaHostUtil = {}));
|
|
31
52
|
var TA_FILE_WRITE_EVENT = "ta:file-write";
|
|
32
53
|
var TA_ASK_ENTRY = "ta-ask";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@celljs/ta-changes",
|
|
3
|
-
"version": "4.13.
|
|
3
|
+
"version": "4.13.1",
|
|
4
4
|
"description": "A pi package for Ta: the files each reply changed, with their diffs, and a button that takes the changes of a reply back",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"pi-package"
|
|
@@ -27,8 +27,8 @@
|
|
|
27
27
|
"watch": "tsc -b -w --preserveWatchOutput"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
|
-
"@celljs/ta-protocol": "4.13.
|
|
31
|
-
"@celljs/ta-web": "4.13.
|
|
30
|
+
"@celljs/ta-protocol": "4.13.1",
|
|
31
|
+
"@celljs/ta-web": "4.13.1",
|
|
32
32
|
"@types/react": "^19.3.0"
|
|
33
33
|
},
|
|
34
34
|
"publishConfig": {
|