You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit a78a1cd
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: app/src/features/chat/context.test.tsx
+32Lines changed: 32 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -39,6 +39,38 @@ function open() {
39
39
}
40
40
41
41
describe("conversation space",()=>{
42
+
test("a turn after a pause tells the conversation it sent again apart",async()=>{
43
+
const{ fake, scout }=awaitopenScout();
44
+
act(()=>{
45
+
// The turn seen in spec 19: almost all of it was the conversation again.
46
+
fake.chat.turn(scout.id,null,{
47
+
input: 2,
48
+
cacheWrite: 72_636,
49
+
reloaded: 72_000,
50
+
cacheRead: 0,
51
+
output: 983,
52
+
});
53
+
});
54
+
constdone=screen.getByText("Done in 4.2 s · 1.6k tokens · reloaded the conversation (72k)");
55
+
expect(done.title).toBe(
56
+
"Took 4.2 s. Read 638 new tokens and wrote 983; reread 0 of the conversation, which weighs much less. It also sent 72k of the conversation again, as the model no longer had it after a pause.",
57
+
);
58
+
});
59
+
60
+
test("a little sent again is not worth a mention",async()=>{
61
+
const{ fake, scout }=awaitopenScout();
62
+
act(()=>{
63
+
fake.chat.turn(scout.id,null,{
64
+
input: 2,
65
+
cacheWrite: 1_400,
66
+
reloaded: 300,
67
+
cacheRead: 40_000,
68
+
output: 100,
69
+
});
70
+
});
71
+
expect(screen.getByText("Done in 4.2 s · 1.2k tokens")).toBeDefined();
Copy file name to clipboardExpand all lines: app/src/i18n/en/account.ts
+5-3Lines changed: 5 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -30,14 +30,16 @@ export const account = {
30
30
tokens: {
31
31
title: "Tokens by bot",
32
32
intro:
33
-
"Tokens are the pieces of text a bot reads and writes. The count adds the new text read and the replies written; the conversation reread each time shows apart, as it weighs much less.",
33
+
"Tokens are the pieces of text a bot reads and writes. The count adds the new text read and the replies written. The conversation reread each time shows apart, as it weighs much less, and so does the conversation sent again after a pause.",
34
34
period: "Period",
35
35
periods: {today: "Today",week: "7 days",month: "30 days",all: "All time"},
"Los tokens son los trozos de texto que un bot lee y escribe. La cuenta suma el texto nuevo leído y las respuestas escritas; la conversación releída cada vez aparece aparte, porque pesa mucho menos.",
33
+
"Los tokens son los trozos de texto que un bot lee y escribe. La cuenta suma el texto nuevo leído y las respuestas escritas. La conversación releída cada vez aparece aparte, porque pesa mucho menos, y también la conversación enviada de nuevo tras una pausa.",
"Tokens são os pedaços de texto que um bot lê e escreve. A conta soma o texto novo lido e as respostas escritas; a conversa relida a cada vez aparece à parte, porque pesa bem menos.",
33
+
"Tokens são os pedaços de texto que um bot lê e escreve. A conta soma o texto novo lido e as respostas escritas. A conversa relida a cada vez aparece à parte, porque pesa bem menos, e a conversa mandada de novo depois de uma pausa também.",
0 commit comments