refactor: move Feishu model override parsing to plugin

This commit is contained in:
Peter Steinberger
2026-04-22 05:35:54 +01:00
parent 7189b49f81
commit bdcbb6b49d
4 changed files with 63 additions and 111 deletions

View File

@@ -0,0 +1,18 @@
import { describe, expect, it } from "vitest";
import { buildFeishuModelOverrideParentCandidates } from "./conversation-id.js";
describe("buildFeishuModelOverrideParentCandidates", () => {
it("returns topic and chat fallback ids for sender-scoped topics", () => {
expect(
buildFeishuModelOverrideParentCandidates(
"oc_group_chat:Topic:om_topic_root:Sender:ou_topic_user",
),
).toEqual(["oc_group_chat:topic:om_topic_root", "oc_group_chat"]);
});
it("returns chat fallback ids for sender-scoped chats", () => {
expect(buildFeishuModelOverrideParentCandidates("oc_group_chat:sender:ou_topic_user")).toEqual([
"oc_group_chat",
]);
});
});