mirror of
https://github.com/Kaelio/ktx.git
synced 2026-06-22 08:38:08 +02:00
9 lines
450 B
TypeScript
9 lines
450 B
TypeScript
import type { MemoryAction } from '../memory/index.js';
|
|
|
|
export function actionTargetConnectionId(action: MemoryAction, runConnectionId: string): string {
|
|
return action.target === 'sl' ? (action.targetConnectionId ?? runConnectionId) : runConnectionId;
|
|
}
|
|
|
|
export function memoryActionIdentity(action: MemoryAction, runConnectionId: string): string {
|
|
return `${action.target}:${actionTargetConnectionId(action, runConnectionId)}:${action.key}`;
|
|
}
|