mirror of
https://github.com/tiennm99/ccs.git
synced 2026-07-16 04:18:05 +00:00
fix(proxy): retain explicit profile names in status
This commit is contained in:
@@ -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');
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user