tokwise 0.1.3 → 0.1.4
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/ask.js +1 -1
- package/dist/reference.js +2 -6
- package/dist/skill.js +1 -1
- package/package.json +1 -1
package/dist/ask.js
CHANGED
|
@@ -39,7 +39,7 @@ async function answerWithOllama(question, results, options) {
|
|
|
39
39
|
.join("\n\n");
|
|
40
40
|
const prompt = [
|
|
41
41
|
"Answer the user's question using only the saved clip evidence below.",
|
|
42
|
-
"Cite clips by their readable reference (e.g. @author
|
|
42
|
+
"Cite clips by their readable reference (e.g. @author (Mon YYYY)) when making claims; include the clip's Source URL when a claim needs to be traceable. If evidence is thin, say so.",
|
|
43
43
|
"",
|
|
44
44
|
`Question: ${question}`,
|
|
45
45
|
"",
|
package/dist/reference.js
CHANGED
|
@@ -23,18 +23,14 @@ export function videoReference(video) {
|
|
|
23
23
|
? `@${video.author.username}`
|
|
24
24
|
: video.author?.displayName || "unknown";
|
|
25
25
|
const date = referenceDate(video);
|
|
26
|
-
|
|
27
|
-
const head = [author, date].filter(Boolean).join(" \u00b7 ");
|
|
28
|
-
return `${head} \u2014 "${title}" #${shortId(video)}`;
|
|
26
|
+
return date ? `${author} (${date})` : author;
|
|
29
27
|
}
|
|
30
28
|
export function formatReference(video) {
|
|
31
29
|
const author = video.author?.username
|
|
32
30
|
? c.accent(`@${video.author.username}`)
|
|
33
31
|
: c.muted(video.author?.displayName || "unknown");
|
|
34
32
|
const date = referenceDate(video);
|
|
35
|
-
|
|
36
|
-
const title = c.value(`"${videoTitle(video)}"`);
|
|
37
|
-
return `${author}${datePart} ${c.muted("\u2014")} ${title} ${c.muted(`#${shortId(video)}`)}`;
|
|
33
|
+
return date ? `${author} ${c.muted(`(${date})`)}` : author;
|
|
38
34
|
}
|
|
39
35
|
function referenceDate(video) {
|
|
40
36
|
const iso = video.createdAt ?? video.savedAt;
|
package/dist/skill.js
CHANGED
|
@@ -24,7 +24,7 @@ export function skillContent() {
|
|
|
24
24
|
"",
|
|
25
25
|
"## Grounding",
|
|
26
26
|
"",
|
|
27
|
-
"Cite clips by their readable reference (`@author
|
|
27
|
+
"Cite clips by their readable reference (`@author (Mon YYYY)`) and the clip URL, or by Markdown page path, when drawing conclusions. Run `tokwise show <id-or-url>` to pull a clip back up. Treat transcripts as user-owned local context and do not assume videos are public.",
|
|
28
28
|
"",
|
|
29
29
|
].join("\n");
|
|
30
30
|
}
|
package/package.json
CHANGED