@cmodjs/core 8.11.0 → 8.11.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/records.d.ts +1 -1
- package/records.js +1 -1
- package/runtime/lifecycle.js +4 -1
- package/src/records.ts +1 -1
- package/src/runtime/lifecycle.ts +2 -1
package/package.json
CHANGED
package/records.d.ts
CHANGED
|
@@ -203,7 +203,7 @@ export declare function newestLog(entries: readonly LogEntry[]): LogEntry[];
|
|
|
203
203
|
export declare function versionsLine({ mod, core, cmod, program, claudeCode }: LogVersions): string;
|
|
204
204
|
export declare function logReport(entry: LogEntry): string;
|
|
205
205
|
export declare function parseConsent(value: unknown, path: string): Record<string, string[]>;
|
|
206
|
-
export declare const coreVersion = "8.11.
|
|
206
|
+
export declare const coreVersion = "8.11.2";
|
|
207
207
|
export declare const oldestCmodVersion = "8.0.0";
|
|
208
208
|
export declare function hotkeyCommand(mod: string, hotkey: string): string;
|
|
209
209
|
export declare function hotkeyBindings(mod: string, hotkeys: Hotkeys | undefined): Record<string, string>;
|
package/records.js
CHANGED
|
@@ -412,7 +412,7 @@ function readHotkeys(hotkeys) {
|
|
|
412
412
|
throw new Error(`package.json "cmod.hotkeys" is not a map of hotkeys to their title and optional default combo. ${fix}`);
|
|
413
413
|
return { hotkeys: checkHotkeys('package.json "cmod"', hotkeys) };
|
|
414
414
|
}
|
|
415
|
-
export const coreVersion = '8.11.
|
|
415
|
+
export const coreVersion = '8.11.2';
|
|
416
416
|
export const oldestCmodVersion = '8.0.0';
|
|
417
417
|
export function hotkeyCommand(mod, hotkey) {
|
|
418
418
|
return `${mod}--${hotkey}`;
|
package/runtime/lifecycle.js
CHANGED
|
@@ -637,7 +637,8 @@ export function createLifecycle(definition, permissionRoutes = () => undefined,
|
|
|
637
637
|
}
|
|
638
638
|
if (event === 'classic.UserPromptSubmit' && phase === 'active' && !hasHeardSessionStart) {
|
|
639
639
|
const { session_id, transcript_path, cwd } = e;
|
|
640
|
-
|
|
640
|
+
if (session_id === (await claude().session.id()))
|
|
641
|
+
await replaySessionStart({ session_id, transcript_path, cwd, hook_event_name: 'SessionStart', source: 'resume' });
|
|
641
642
|
}
|
|
642
643
|
const answer = router.dispatch(event, e, next, signal);
|
|
643
644
|
const render = e;
|
|
@@ -1066,6 +1067,8 @@ async function createMod(definition, runtime) {
|
|
|
1066
1067
|
router.add('classic.UserPromptSubmit', async (e, next) => {
|
|
1067
1068
|
staleCwd = undefined;
|
|
1068
1069
|
await followSession();
|
|
1070
|
+
if (e.session_id !== (await claude.session.id()))
|
|
1071
|
+
return next(e);
|
|
1069
1072
|
const isPerson = e.source === undefined || e.source === 'user' || e.source === 'sdk';
|
|
1070
1073
|
await followCurrent(e.session_id, e.session_title || (isPerson && !hasEarlierPrompts && client.sessions.current.title === '' ? firstLine(e.prompt) : undefined)).catch((error) => report({ id: 'cmod:current', message: 'Kept the details of the session from before', error }));
|
|
1071
1074
|
return next(e);
|
package/src/records.ts
CHANGED
|
@@ -511,7 +511,7 @@ function readHotkeys(hotkeys: unknown): Steps {
|
|
|
511
511
|
return { hotkeys: checkHotkeys('package.json "cmod"', hotkeys as Record<string, HotkeyInit>) }
|
|
512
512
|
}
|
|
513
513
|
|
|
514
|
-
export const coreVersion = '8.11.
|
|
514
|
+
export const coreVersion = '8.11.2'
|
|
515
515
|
|
|
516
516
|
export const oldestCmodVersion = '8.0.0'
|
|
517
517
|
|
package/src/runtime/lifecycle.ts
CHANGED
|
@@ -733,7 +733,7 @@ export function createLifecycle<State extends object, Declared extends Options =
|
|
|
733
733
|
}
|
|
734
734
|
if (event === 'classic.UserPromptSubmit' && phase === 'active' && !hasHeardSessionStart) {
|
|
735
735
|
const { session_id, transcript_path, cwd } = e as Frozen<Args<'classic.UserPromptSubmit'>>
|
|
736
|
-
await replaySessionStart({ session_id, transcript_path, cwd, hook_event_name: 'SessionStart', source: 'resume' })
|
|
736
|
+
if (session_id === (await claude().session.id())) await replaySessionStart({ session_id, transcript_path, cwd, hook_event_name: 'SessionStart', source: 'resume' })
|
|
737
737
|
}
|
|
738
738
|
const answer = router.dispatch(event, e, next, signal)
|
|
739
739
|
const render = e as Frozen<Args<'ui.render'>>
|
|
@@ -1149,6 +1149,7 @@ async function createMod<State extends object, Declared extends Options>(definit
|
|
|
1149
1149
|
router.add('classic.UserPromptSubmit', async (e, next) => {
|
|
1150
1150
|
staleCwd = undefined
|
|
1151
1151
|
await followSession()
|
|
1152
|
+
if (e.session_id !== (await claude.session.id())) return next(e)
|
|
1152
1153
|
const isPerson = e.source === undefined || e.source === 'user' || e.source === 'sdk'
|
|
1153
1154
|
await followCurrent(e.session_id, e.session_title || (isPerson && !hasEarlierPrompts && client.sessions.current.title === '' ? firstLine(e.prompt) : undefined)).catch((error: unknown) => report({ id: 'cmod:current', message: 'Kept the details of the session from before', error }))
|
|
1154
1155
|
return next(e)
|