refactor(core): Remove re-implementations of alias resolver

This commit is contained in:
2026-07-11 17:28:54 +05:30
parent 224553c98c
commit 99c11cbbfe
7 changed files with 29 additions and 24 deletions

View File

@@ -1,5 +1,5 @@
import Database from "better-sqlite3";
import { Entity } from "@omnia/core";
import { Entity, resolveAlias } from "@omnia/core";
import { Intent } from "@omnia/intent";
export interface BufferEntry {
@@ -16,10 +16,7 @@ export interface BufferEntry {
};
}
export function resolveAlias(viewer: Entity, targetId: string): string {
if (targetId === viewer.id) return "you";
return viewer.aliases.get(targetId) ?? "an unfamiliar figure";
}
export { resolveAlias } from "@omnia/core";
export function serializeSubjectiveBufferEntry(
entry: BufferEntry,