MCPcopy Create free account
hub / github.com/MoonshotAI/kimi-code / findRenamedEvent

Function findRenamedEvent

packages/node-sdk/test/rename-session.test.ts:39–47  ·  view source on GitHub ↗
(
  events: readonly Event[],
)

Source from the content-addressed store, hash-verified

37}
38
39function findRenamedEvent(
40 events: readonly Event[],
41): Extract<Event, { readonly type: 'session.meta.updated' }> {
42 const event = events.find((item) => item.type === 'session.meta.updated');
43 if (event === undefined || event.type !== 'session.meta.updated') {
44 throw new Error('session_meta_updated event not found');
45 }
46 return event;
47}
48
49describe('SessionStore.rename', () => {
50 it('persists custom title state and preserves existing state fields', async () => {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected