@celljs/ta-share 4.34.0 → 4.35.0
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 +0 -41
- package/package.json +4 -4
package/extension/index.mjs
CHANGED
|
@@ -66,47 +66,6 @@ var TaDoubleLookUtil;
|
|
|
66
66
|
}
|
|
67
67
|
TaDoubleLookUtil2.given = given;
|
|
68
68
|
})(TaDoubleLookUtil || (TaDoubleLookUtil = {}));
|
|
69
|
-
var TA_ASK_ENTRY = "ta-ask";
|
|
70
|
-
var TaAskUtil;
|
|
71
|
-
(function(TaAskUtil2) {
|
|
72
|
-
const LENGTH = 120;
|
|
73
|
-
function entry(question) {
|
|
74
|
-
const line = question.replace(/\s+/g, " ").trim();
|
|
75
|
-
return { question: line.length > LENGTH ? `${line.slice(0, LENGTH - 1)}…` : line };
|
|
76
|
-
}
|
|
77
|
-
TaAskUtil2.entry = entry;
|
|
78
|
-
function asking(entries) {
|
|
79
|
-
var _a;
|
|
80
|
-
for (let i = entries.length - 1;i >= 0; i--) {
|
|
81
|
-
const entry2 = entries[i];
|
|
82
|
-
if (entry2.type === "message" && ((_a = entry2.message) === null || _a === undefined ? undefined : _a.role) === "user") {
|
|
83
|
-
return;
|
|
84
|
-
}
|
|
85
|
-
if (entry2.type === "custom" && entry2.customType === TA_ASK_ENTRY) {
|
|
86
|
-
return read(entry2);
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
return;
|
|
90
|
-
}
|
|
91
|
-
TaAskUtil2.asking = asking;
|
|
92
|
-
function next(asked, entry2) {
|
|
93
|
-
var _a;
|
|
94
|
-
if (entry2.type === "message" && ((_a = entry2.message) === null || _a === undefined ? undefined : _a.role) === "user") {
|
|
95
|
-
return;
|
|
96
|
-
}
|
|
97
|
-
return entry2.type === "custom" && entry2.customType === TA_ASK_ENTRY ? read(entry2) : asked;
|
|
98
|
-
}
|
|
99
|
-
TaAskUtil2.next = next;
|
|
100
|
-
function read(found) {
|
|
101
|
-
var _a;
|
|
102
|
-
const question = (_a = found.data) === null || _a === undefined ? undefined : _a.question;
|
|
103
|
-
if (typeof question !== "string" || !question.trim()) {
|
|
104
|
-
return;
|
|
105
|
-
}
|
|
106
|
-
const at = found.timestamp ? Date.parse(found.timestamp) : Number.NaN;
|
|
107
|
-
return { question: entry(question).question, at: Number.isNaN(at) ? 0 : at };
|
|
108
|
-
}
|
|
109
|
-
})(TaAskUtil || (TaAskUtil = {}));
|
|
110
69
|
|
|
111
70
|
// ../ta-protocol/esm/common/language.js
|
|
112
71
|
var TaLanguageUtil;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@celljs/ta-share",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.35.0",
|
|
4
4
|
"description": "A pi package for Ta: share a conversation, a page or a file by a link, public, with a password or for yourself, end to end through the relay; open and import what others share",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"pi-package"
|
|
@@ -27,9 +27,9 @@
|
|
|
27
27
|
"watch": "tsc -b -w --preserveWatchOutput"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
|
-
"@celljs/ta-protocol": "4.
|
|
31
|
-
"@celljs/ta-relay": "4.
|
|
32
|
-
"@celljs/ta-web": "4.
|
|
30
|
+
"@celljs/ta-protocol": "4.35.0",
|
|
31
|
+
"@celljs/ta-relay": "4.35.0",
|
|
32
|
+
"@celljs/ta-web": "4.35.0",
|
|
33
33
|
"@types/react": "^19.3.0"
|
|
34
34
|
},
|
|
35
35
|
"publishConfig": {
|