mirror of
https://github.com/wu736139669/hapi.git
synced 2026-08-05 06:24:37 +00:00
refactor: extract chat normalization and reducer logic, cleanup legacy credentials
- Split normalize.ts into focused modules: normalizeAgent, normalizeUser, normalizeUtils - Extract reducer.ts into specialized modules: reducerCliOutput, reducerEvents, reducerTimeline, reducerTools - Remove legacy credentials support (zod schema, readCredentials, writeCredentialsLegacy) - Refactor NewSession component from monolithic file into modular subcomponents - Improves code organization and maintainability across chat and authentication layers
This commit is contained in:
+1
-10
@@ -7,7 +7,7 @@
|
||||
|
||||
import chalk from 'chalk'
|
||||
import { configuration } from '@/configuration'
|
||||
import { readSettings, readCredentials } from '@/persistence'
|
||||
import { readSettings } from '@/persistence'
|
||||
import { checkIfDaemonRunningAndCleanupStaleState } from '@/daemon/controlClient'
|
||||
import { findRunawayHappyProcesses, findAllHappyProcesses } from '@/daemon/doctor'
|
||||
import { readDaemonState } from '@/persistence'
|
||||
@@ -147,15 +147,6 @@ export async function runDoctorCommand(filter?: 'all' | 'daemon'): Promise<void>
|
||||
console.log(chalk.gray(' Run `hapi auth login` to configure or set CLI_API_TOKEN env var'));
|
||||
}
|
||||
|
||||
// Legacy credentials (unused in direct-connect mode)
|
||||
try {
|
||||
const credentials = await readCredentials();
|
||||
if (credentials) {
|
||||
console.log(chalk.yellow('⚠️ Legacy credentials file present (unused in direct-connect mode)'));
|
||||
}
|
||||
} catch {
|
||||
// ignore
|
||||
}
|
||||
}
|
||||
|
||||
// Daemon status - shown for both 'all' and 'daemon' filters
|
||||
|
||||
Reference in New Issue
Block a user