From 6c93fe58b04472c7eb5d0c57d7467c256e13ec4c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=8D=E3=82=80=E3=81=9D=E3=82=93?= Date: Sun, 2 Nov 2025 13:02:38 +0900 Subject: [PATCH] fix: Change unifySameTitleSession default value to false (#48) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * refactor: Clean up message handling in ClaudeCodeLifeCycleService - Removed debug logging from handleMessage function. - Eliminated unnecessary fallback message check in message iteration loop. This improves code readability and performance by streamlining message processing. * fix: Change unifySameTitleSession default value to false Changed the default value of unifySameTitleSession configuration from true to false. This affects both the Zod schema definition and the UserConfigService initial state. Updated README.md to reflect the new default value in the User Settings table. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --------- Co-authored-by: Claude --- README.md | 2 +- .../core/claude-code/services/ClaudeCodeLifeCycleService.ts | 6 ------ src/server/core/platform/services/UserConfigService.ts | 2 +- src/server/lib/config/config.ts | 2 +- 4 files changed, 3 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index abed0b3..fb4922c 100644 --- a/README.md +++ b/README.md @@ -103,7 +103,7 @@ Settings can be configured from the sidebar in Claude Code Viewer. | Setting | Default | Description | | --- | --- | --- | | Hide sessions without user messages | true | Claude Code creates logs for operations like `/compact` that aren't tied to actual tasks, which can create noise. When enabled, sessions without user messages are hidden. | -| Unify sessions with same title | true | When resuming, Claude Code creates a new session with regenerated conversation logs. When enabled, only the latest session with the same title is displayed. | +| Unify sessions with same title | false | When resuming, Claude Code creates a new session with regenerated conversation logs. When enabled, only the latest session with the same title is displayed. | | Enter Key Behavior | Shift+Enter | Specifies which key combination sends messages. Options include Enter, Shift+Enter, and Command+Enter. | | Permission Mode | Ask permission | Controls the approval logic when Claude Code requests tool invocations. By default, users approve requests through the UI. This feature requires Claude Code v1.0.82 or later; earlier versions automatically approve regardless of this setting. | | Theme | System | Toggles between Dark Mode and Light Mode. Default follows system settings. | diff --git a/src/server/core/claude-code/services/ClaudeCodeLifeCycleService.ts b/src/server/core/claude-code/services/ClaudeCodeLifeCycleService.ts index 4097d3f..05b19f1 100644 --- a/src/server/core/claude-code/services/ClaudeCodeLifeCycleService.ts +++ b/src/server/core/claude-code/services/ClaudeCodeLifeCycleService.ts @@ -147,8 +147,6 @@ const LayerImpl = Effect.gen(function* () { const handleMessage = (message: SDKMessage) => Effect.gen(function* () { - console.log("[debug] handleMessage", message.type); - const processState = yield* sessionProcessService.getSessionProcess( sessionProcess.def.sessionProcessId, ); @@ -288,10 +286,6 @@ const LayerImpl = Effect.gen(function* () { for await (const message of messageIter) { const fallbackMessage = fallbackSdkMessage(message); - if (fallbackMessage === null) { - continue; - } - const result = await Runtime.runPromise(runtime)( handleMessage(fallbackMessage), ).catch((error) => { diff --git a/src/server/core/platform/services/UserConfigService.ts b/src/server/core/platform/services/UserConfigService.ts index 6f6734e..a63cf4b 100644 --- a/src/server/core/platform/services/UserConfigService.ts +++ b/src/server/core/platform/services/UserConfigService.ts @@ -5,7 +5,7 @@ import type { InferEffect } from "../../../lib/effect/types"; const LayerImpl = Effect.gen(function* () { const configRef = yield* Ref.make({ hideNoUserMessageSession: true, - unifySameTitleSession: true, + unifySameTitleSession: false, enterKeyBehavior: "shift-enter-send", permissionMode: "default", locale: "ja", diff --git a/src/server/lib/config/config.ts b/src/server/lib/config/config.ts index 3a6996e..3517798 100644 --- a/src/server/lib/config/config.ts +++ b/src/server/lib/config/config.ts @@ -3,7 +3,7 @@ import { localeSchema } from "../../../lib/i18n/schema"; export const userConfigSchema = z.object({ hideNoUserMessageSession: z.boolean().optional().default(true), - unifySameTitleSession: z.boolean().optional().default(true), + unifySameTitleSession: z.boolean().optional().default(false), enterKeyBehavior: z .enum(["shift-enter-send", "enter-send", "command-enter-send"]) .optional()