@celljs/ta-workspace 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/package.json +3 -3
- package/web/index.js +21 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@celljs/ta-workspace",
|
|
3
|
-
"version": "4.13.
|
|
3
|
+
"version": "4.13.1",
|
|
4
4
|
"description": "A pi package for Ta: the workspace beside the conversation, with an explorer, open files, search, source control, terminals and a browser",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"pi-package"
|
|
@@ -25,8 +25,8 @@
|
|
|
25
25
|
"watch": "tsc -b -w --preserveWatchOutput"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
|
-
"@celljs/ta-protocol": "4.13.
|
|
29
|
-
"@celljs/ta-web": "4.13.
|
|
28
|
+
"@celljs/ta-protocol": "4.13.1",
|
|
29
|
+
"@celljs/ta-web": "4.13.1",
|
|
30
30
|
"@types/react": "^19.3.0",
|
|
31
31
|
"marked": "^14.0.0"
|
|
32
32
|
},
|
package/web/index.js
CHANGED
|
@@ -5999,6 +5999,27 @@ var TaHostUtil;
|
|
|
5999
5999
|
});
|
|
6000
6000
|
}
|
|
6001
6001
|
TaHostUtil2.reach = reach;
|
|
6002
|
+
function marked2(systemPrompt, mark) {
|
|
6003
|
+
return role(systemPrompt).includes(mark);
|
|
6004
|
+
}
|
|
6005
|
+
TaHostUtil2.marked = marked2;
|
|
6006
|
+
function role(systemPrompt) {
|
|
6007
|
+
if (!systemPrompt) {
|
|
6008
|
+
return "";
|
|
6009
|
+
}
|
|
6010
|
+
const open = `<addendum>
|
|
6011
|
+
`;
|
|
6012
|
+
const start = systemPrompt.indexOf(open);
|
|
6013
|
+
const context = systemPrompt.indexOf(`<project_context>
|
|
6014
|
+
`);
|
|
6015
|
+
if (start < 0 || context >= 0 && context < start) {
|
|
6016
|
+
return "";
|
|
6017
|
+
}
|
|
6018
|
+
const end = systemPrompt.indexOf(`
|
|
6019
|
+
</addendum>`, start);
|
|
6020
|
+
return systemPrompt.slice(start + open.length, end < 0 ? undefined : end);
|
|
6021
|
+
}
|
|
6022
|
+
TaHostUtil2.role = role;
|
|
6002
6023
|
})(TaHostUtil || (TaHostUtil = {}));
|
|
6003
6024
|
var TA_ASK_ENTRY = "ta-ask";
|
|
6004
6025
|
var TaAskUtil;
|