fix(proxy): retain explicit profile names in status

This commit is contained in:
Wooseong Kim
2026-04-20 15:30:51 +09:00
parent 391bdddc22
commit afcb1abf9e
2 changed files with 7 additions and 1 deletions
+1 -1
View File
@@ -199,7 +199,7 @@ async function getOpenAICompatProxyStatusForProfile(
const state = getOpenAICompatProxyStateForProfile(profileName);
const session = state.session;
if (!session) {
return { running: false };
return { running: false, profileName };
}
const port = session.port;
@@ -464,4 +464,10 @@ describe('openai proxy daemon lifecycle', () => {
expect(fs.existsSync(getLegacyOpenAICompatProxyPidPath())).toBe(false);
expect(fs.existsSync(getLegacyOpenAICompatProxySessionPath())).toBe(false);
}, 35000);
it('keeps the requested profile name in stopped status results', async () => {
const status = await getOpenAICompatProxyStatus('never-started');
expect(status.running).toBe(false);
expect(status.profileName).toBe('never-started');
});
});