Skip to content

The agent that grows with you

fix(desktop): Skip setup opens a new chat in the launch profile

alt-glitch73509986f25b
diff --git a/apps/desktop/src/i18n/ar_first_run.ts b/apps/desktop/src/i18n/ar_first_run.ts
index 5a113905980..2176b67e555 100644
--- a/apps/desktop/src/i18n/ar_first_run.ts
+++ b/apps/desktop/src/i18n/ar_first_run.ts
@@ -20,7 +20,7 @@ export const arFirstRun: FirstRunCopy = {
noAnswer: 'لا توجد إجابة',
skippedAll: 'تم تخطي الإعداد',
skip: 'تخطي الإعداد',
- skipTip: 'إنهاء الإعداد الموجَّه. يمكنك متابعة المحادثة هنا.',
+ skipTip: 'إنهاء الإعداد الموجَّه وفتح محادثة جديدة.',
skipFailed: 'تعذّر تخطي الإعداد',
localModel: {
title: 'يمكن لهذا الكمبيوتر تشغيل نموذج محليًا',
diff --git a/apps/desktop/src/i18n/de_first_run.ts b/apps/desktop/src/i18n/de_first_run.ts
index 5349ce3184b..d6fb6520e06 100644
--- a/apps/desktop/src/i18n/de_first_run.ts
+++ b/apps/desktop/src/i18n/de_first_run.ts
@@ -20,7 +20,7 @@ export const deFirstRun: FirstRunCopy = {
noAnswer: 'Keine Antwort',
skippedAll: 'Einrichtung übersprungen',
skip: 'Einrichtung überspringen',
- skipTip: 'Beendet die geführte Einrichtung. Du kannst hier weiterchatten.',
+ skipTip: 'Beendet die geführte Einrichtung und öffnet einen neuen Chat.',
skipFailed: 'Einrichtung konnte nicht übersprungen werden',
localModel: {
title: 'Dieser Computer kann ein Modell lokal ausführen',
diff --git a/apps/desktop/src/i18n/en_first_run.ts b/apps/desktop/src/i18n/en_first_run.ts
index 39d5c23108d..8712e358eb2 100644
--- a/apps/desktop/src/i18n/en_first_run.ts
+++ b/apps/desktop/src/i18n/en_first_run.ts
@@ -20,7 +20,7 @@ export const enFirstRun: FirstRunCopy = {
noAnswer: 'No answer',
skippedAll: 'Setup skipped',
skip: 'Skip setup',
- skipTip: 'End the guided setup. You can keep chatting here.',
+ skipTip: 'End the guided setup and open a new chat.',
skipFailed: 'Could not skip setup',
localModel: {
title: 'This computer can run a model locally',
diff --git a/apps/desktop/src/i18n/es_first_run.ts b/apps/desktop/src/i18n/es_first_run.ts
index 16da3bd4843..bb7c50a3e77 100644
--- a/apps/desktop/src/i18n/es_first_run.ts
+++ b/apps/desktop/src/i18n/es_first_run.ts
@@ -20,7 +20,7 @@ export const esFirstRun: FirstRunCopy = {
noAnswer: 'Sin respuesta',
skippedAll: 'Configuración omitida',
skip: 'Omitir configuración',
- skipTip: 'Termina la configuración guiada. Puedes seguir chateando aquí.',
+ skipTip: 'Termina la configuración guiada y abre un chat nuevo.',
skipFailed: 'No se pudo omitir la configuración',
localModel: {
title: 'Este ordenador puede ejecutar un modelo localmente',
diff --git a/apps/desktop/src/i18n/fr_first_run.ts b/apps/desktop/src/i18n/fr_first_run.ts
index 2fdfd7bb001..fd11bacb432 100644
--- a/apps/desktop/src/i18n/fr_first_run.ts
+++ b/apps/desktop/src/i18n/fr_first_run.ts
@@ -20,7 +20,7 @@ export const frFirstRun: FirstRunCopy = {
noAnswer: 'Pas de réponse',
skippedAll: 'Configuration ignorée',
skip: 'Ignorer la configuration',
- skipTip: 'Termine la configuration guidée. Vous pouvez continuer à discuter ici.',
+ skipTip: 'Termine la configuration guidée et ouvre une nouvelle discussion.',
skipFailed: 'Impossible d’ignorer la configuration',
localModel: {
title: 'Cet ordinateur peut exécuter un modèle en local',
diff --git a/apps/desktop/src/i18n/ja_first_run.ts b/apps/desktop/src/i18n/ja_first_run.ts
index 051751f53f8..1dd693e118f 100644
--- a/apps/desktop/src/i18n/ja_first_run.ts
+++ b/apps/desktop/src/i18n/ja_first_run.ts
@@ -20,7 +20,7 @@ export const jaFirstRun: FirstRunCopy = {
noAnswer: '回答なし',
skippedAll: 'セットアップをスキップしました',
skip: 'セットアップをスキップ',
- skipTip: 'ガイド付きセットアップを終了します。このままチャットを続けられます。',
+ skipTip: 'ガイド付きセットアップを終了し、新しいチャットを開きます。',
skipFailed: 'セットアップをスキップできませんでした',
localModel: {
title: 'このコンピューターはモデルをローカルで実行できます',
diff --git a/apps/desktop/src/i18n/ru_first_run.ts b/apps/desktop/src/i18n/ru_first_run.ts
index 5946263b476..986b8f5b3b2 100644
--- a/apps/desktop/src/i18n/ru_first_run.ts
+++ b/apps/desktop/src/i18n/ru_first_run.ts
@@ -20,7 +20,7 @@ export const ruFirstRun: FirstRunCopy = {
noAnswer: 'Нет ответа',
skippedAll: 'Настройка пропущена',
skip: 'Пропустить настройку',
- skipTip: 'Завершить пошаговую настройку. Можно продолжить общение здесь.',
+ skipTip: 'Завершить пошаговую настройку и открыть новый чат.',
skipFailed: 'Не удалось пропустить настройку',
localModel: {
title: 'Этот компьютер может запускать модель локально',
diff --git a/apps/desktop/src/i18n/zh-hant_first_run.ts b/apps/desktop/src/i18n/zh-hant_first_run.ts
index e91105342ed..5719c2031ac 100644
--- a/apps/desktop/src/i18n/zh-hant_first_run.ts
+++ b/apps/desktop/src/i18n/zh-hant_first_run.ts
@@ -20,7 +20,7 @@ export const zhHantFirstRun: FirstRunCopy = {
noAnswer: '未回答',
skippedAll: '已略過設定',
skip: '略過設定',
- skipTip: '結束引導設定。你可以繼續在這裡對話。',
+ skipTip: '結束引導設定並開啟新對話。',
skipFailed: '無法略過設定',
localModel: {
title: '這部電腦可以在本機執行模型',
diff --git a/apps/desktop/src/i18n/zh_first_run.ts b/apps/desktop/src/i18n/zh_first_run.ts
index 2a6c6a41e56..1da0fab8f8c 100644
--- a/apps/desktop/src/i18n/zh_first_run.ts
+++ b/apps/desktop/src/i18n/zh_first_run.ts
@@ -20,7 +20,7 @@ export const zhFirstRun: FirstRunCopy = {
noAnswer: '未回答',
skippedAll: '已跳过设置',
skip: '跳过设置',
- skipTip: '结束引导设置。你可以继续在这里对话。',
+ skipTip: '结束引导设置并打开新对话。',
skipFailed: '无法跳过设置',
localModel: {
title: '这台电脑可以在本地运行模型',
diff --git a/apps/desktop/src/store/onboarding-run.test.ts b/apps/desktop/src/store/onboarding-run.test.ts
index d54a9ffe5ab..7656e34a4fc 100644
--- a/apps/desktop/src/store/onboarding-run.test.ts
+++ b/apps/desktop/src/store/onboarding-run.test.ts
@@ -10,7 +10,7 @@ import {
skipOnboarding,
startOnboarding
} from './onboarding-run'
-import { $activeGatewayProfile } from './profile'
+import { $activeGatewayProfile, $freshSessionRequest, $newChatProfile } from './profile'
import { $connection, $selectedStoredSessionId } from './session'
const ensureProfile = async (): Promise<void> => undefined
@@ -101,6 +101,20 @@ describe('onboarding run', () => {
$activeGatewayProfile.set('default')
})
+ it('opens a new chat in the launch profile on Skip setup', async () => {
+ $activeGatewayProfile.set('work')
+ const { request } = backend({ eligible: true, run: true })
+ await startOnboarding(request, resume, { ensureProfile })
+ const fresh = $freshSessionRequest.get()
+
+ await skipOnboarding(request, 'rt-1')
+ $activeGatewayProfile.set('default')
+
+ expect($onboardingEnded.get()).toBe('skipped')
+ expect($freshSessionRequest.get()).toBe(fresh + 1)
+ expect($newChatProfile.get()).toBe('work')
+ })
+
it('keeps the run when the backend refuses the skip', async () => {
const { request } = backend({ eligible: true, run: true })
await startOnboarding(request, resume, { ensureProfile })
diff --git a/apps/desktop/src/store/onboarding-run.ts b/apps/desktop/src/store/onboarding-run.ts
index 369f5d9ac04..7fd8cae2eeb 100644
--- a/apps/desktop/src/store/onboarding-run.ts
+++ b/apps/desktop/src/store/onboarding-run.ts
@@ -17,7 +17,7 @@ import type { GatewayRequester } from '@/lib/yolo-session'
import { activeGatewayConnectionId } from './gateway'
import { $onboardingPhase } from './onboarding-phase'
import { markOnboardingDecided, setOnboardingSurfaceActive } from './onboarding-presence'
-import { $activeGatewayProfile, ensureGatewayAgent, ensureGatewayProfile } from './profile'
+import { $activeGatewayProfile, ensureGatewayAgent, ensureGatewayProfile, newSessionInProfile } from './profile'
import { $connection, $selectedStoredSessionId } from './session'
import type { SetupBeatToolResult } from './setup-beat'
@@ -231,11 +231,13 @@ export function endOnboarding(outcome: 'done' | 'skipped'): void {
$onboardingSettleFrom.set($onboardingSettleFrom.get() ?? Date.now())
}
-/** Skip setup: the backend ends the run and closes the card that waits. A failed skip leaves the run
- * going, so Skip setup stays on offer; the caller reports the error. */
+/** Skip setup: the backend ends the run and closes the card that waits, and a new chat opens in the
+ * profile the window launched on (main's rule). A failed skip leaves the run going, so Skip setup
+ * stays on offer; the caller reports the error. */
export async function skipOnboarding(request: OnboardingRequest, runtimeId: string): Promise<void> {
await request('onboarding.skip', { session_id: runtimeId })
endOnboarding('skipped')
+ newSessionInProfile(launch?.profile ?? ONBOARDING_PROFILE)
}
/** A `setup_beat` result that ends the run: `completed` (the model said done) or `skipped_all`. `ids`: