Add link understanding tool support (#1637)

* Add

* Fix

---------

Co-authored-by: Richard <dasilva333@DESKTOP-74E3GJO.localdomain>
This commit is contained in:
Richard Pinedo
2026-01-24 19:15:54 -05:00
committed by GitHub
parent 2f58d59f22
commit 426168a338
13 changed files with 323 additions and 0 deletions

View File

@@ -12,6 +12,7 @@ import { resolveCommandAuthorization } from "../command-auth.js";
import type { MsgContext } from "../templating.js";
import { SILENT_REPLY_TOKEN } from "../tokens.js";
import { applyMediaUnderstanding } from "../../media-understanding/apply.js";
import { applyLinkUnderstanding } from "../../link-understanding/apply.js";
import type { GetReplyOptions, ReplyPayload } from "../types.js";
import { resolveDefaultModel } from "./directive-handling.js";
import { resolveReplyDirectives } from "./get-reply-directives.js";
@@ -89,6 +90,10 @@ export async function getReplyFromConfig(
agentDir,
activeModel: { provider, model },
});
await applyLinkUnderstanding({
ctx: finalized,
cfg,
});
}
const commandAuthorized = finalized.CommandAuthorized;

View File

@@ -71,6 +71,7 @@ export type MsgContext = {
Transcript?: string;
MediaUnderstanding?: MediaUnderstandingOutput[];
MediaUnderstandingDecisions?: MediaUnderstandingDecision[];
LinkUnderstanding?: string[];
Prompt?: string;
MaxChars?: number;
ChatType?: string;