MCPcopy Create free account
hub / github.com/ChatGPTBox-dev/chatGPTBox / createSession

Function createSession

tests/unit/popup/provider-secret-utils.test.mjs:30–44  ·  view source on GitHub ↗
(apiModeOverrides = {})

Source from the content-addressed store, hash-verified

28}
29
30function createSession(apiModeOverrides = {}) {
31 return {
32 sessionId: `session-${Math.random().toString(36).slice(2)}`,
33 apiMode: {
34 groupName: 'customApiModelKeys',
35 itemName: 'customModel',
36 isCustom: true,
37 customName: 'custom-model',
38 providerId: 'myproxy',
39 apiKey: 'session-key',
40 ...apiModeOverrides,
41 },
42 conversationRecords: [],
43 }
44}
45
46test('buildProviderSecretUpdate returns empty object for empty providerId', () => {
47 assert.deepEqual(buildProviderSecretUpdate({}, '', 'key'), {})

Calls

no outgoing calls

Tested by

no test coverage detected