@jskit-ai/assistant-core 0.2.12 → 0.2.13
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.
|
@@ -179,6 +179,7 @@ const adapter = reactive({
|
|
|
179
179
|
<button v-if="capabilitiesEnabled" @click="finishUploads">Finish uploads</button>
|
|
180
180
|
<button @click="goalEnabled = !goalEnabled">Toggle goals</button>
|
|
181
181
|
<button v-if="goal" @click="goal = { ...goal, status: 'blocked', reason: 'An explanation of the blocker. '.repeat(200) }">Block goal with long explanation</button>
|
|
182
|
+
<button v-if="goal" @click="goal = { ...goal, status: 'complete' }">Complete goal</button>
|
|
182
183
|
<template v-if="previewFixture">
|
|
183
184
|
<button @click="temporaryWords = 'Exact temporary words'; temporaryPresent = true; temporaryEditing = false">Add temporary message</button>
|
|
184
185
|
<button @click="newerWords = 'Keep newer live words'; newerPresent = true; newerEditing = false">Add newer temporary message</button>
|
package/package.json
CHANGED
|
@@ -71,7 +71,7 @@ async function setGoal() {
|
|
|
71
71
|
<v-btn v-bind="menuProps" class="assistant-goal" size="small" variant="text" :aria-label="label" :title="[label, elapsedText, goal?.objective].filter(Boolean).join('\n')">
|
|
72
72
|
<span v-if="goal" class="assistant-goal__light" :class="{ 'assistant-goal__light--running': running, 'assistant-goal__light--working': working, 'assistant-goal__light--paused': goal.status === 'paused' }" aria-hidden="true" />
|
|
73
73
|
<span class="assistant-goal__label">{{ state.loading ? t('jskit.assistant.goal.loading') : state.available === false ? t('jskit.assistant.goal.unavailable') : starting ? t('jskit.assistant.goal.starting') : goal ? t('jskit.assistant.goal.goal') : t('jskit.assistant.goal.set') }}</span>
|
|
74
|
-
<span v-if="elapsed" class="assistant-goal__elapsed" aria-hidden="true">{{ elapsed }}</span>
|
|
74
|
+
<span v-if="elapsed && goal.status !== 'complete'" class="assistant-goal__elapsed" aria-hidden="true">{{ elapsed }}</span>
|
|
75
75
|
</v-btn>
|
|
76
76
|
</template>
|
|
77
77
|
<v-card class="assistant-goal__details pa-3" max-width="360">
|
|
@@ -1025,6 +1025,10 @@ test("optional goals show running and paused lights, count only active time, and
|
|
|
1025
1025
|
await expect(page.getByRole("button", { name: "Goal paused", exact: true })).toBeVisible();
|
|
1026
1026
|
await page.getByRole("button", { name: "Resume goal", exact: true }).click();
|
|
1027
1027
|
await expect(page.getByRole("button", { name: "Pause goal", exact: true })).toBeVisible();
|
|
1028
|
+
// A finished goal keeps its running time in its details, not as a number beside it.
|
|
1029
|
+
await page.getByRole("button", { name: "Complete goal", exact: true }).evaluate(element => element.click());
|
|
1030
|
+
await expect(page.getByRole("button", { name: "Goal complete", exact: true })).toBeVisible();
|
|
1031
|
+
await expect(elapsed).toHaveCount(0);
|
|
1028
1032
|
await page.getByRole("button", { name: "Toggle goals" }).evaluate(element => element.click());
|
|
1029
1033
|
await expect(page.locator(".assistant-goal")).toHaveCount(0);
|
|
1030
1034
|
await expect(page.getByRole("button", { name: "Pause goal", exact: true })).toBeHidden();
|