AllowedSecretsStore (Phantom.Workspaces.Llm.Core\Secrets\AllowedSecretsStore.cs, added in #1244) duplicates two pieces of logic from ConfigurationPersistenceService (Phantom.Workspaces\Configuration\ConfigurationPersistenceService.cs):
- The
JsonSerializerOptions (camel-case, WhenWritingNull, indented, camel-case string enums).
- The
%APPDATA%\Phantom.Workspaces\ base directory used to locate the default file next to config.json.
The duplication exists because ConfigurationPersistenceService lives in the application project, which depends on Llm.Core; Llm.Core cannot reference it without introducing a project-reference cycle.
Proposed fix: extract the shared serializer options and the %APPDATA%\Phantom.Workspaces path helper into a lower-level project referenced by both (e.g. Phantom.Workspaces.Data.Core or a small shared configuration project), then have both consumers use it.
Non-blocking refactor; behaviour is currently identical between the two.
AllowedSecretsStore(Phantom.Workspaces.Llm.Core\Secrets\AllowedSecretsStore.cs, added in #1244) duplicates two pieces of logic fromConfigurationPersistenceService(Phantom.Workspaces\Configuration\ConfigurationPersistenceService.cs):JsonSerializerOptions(camel-case,WhenWritingNull, indented, camel-case string enums).%APPDATA%\Phantom.Workspaces\base directory used to locate the default file next toconfig.json.The duplication exists because
ConfigurationPersistenceServicelives in the application project, which depends onLlm.Core;Llm.Corecannot reference it without introducing a project-reference cycle.Proposed fix: extract the shared serializer options and the
%APPDATA%\Phantom.Workspacespath helper into a lower-level project referenced by both (e.g.Phantom.Workspaces.Data.Coreor a small shared configuration project), then have both consumers use it.Non-blocking refactor; behaviour is currently identical between the two.