fix(image): accept @-prefixed file paths
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
- Subagents: add config to set default sub-agent model (`agents.defaults.subagents.model` + per-agent override); still overridden by `sessions_spawn.model`.
|
||||
|
||||
### Fixes
|
||||
- Tools/Models: MiniMax vision now uses the Coding Plan VLM endpoint (`/v1/coding_plan/vlm`) so the `image` tool works with MiniMax keys.
|
||||
- Tools/Models: MiniMax vision now uses the Coding Plan VLM endpoint (`/v1/coding_plan/vlm`) so the `image` tool works with MiniMax keys (also accepts `@/path/to/file.png`-style inputs).
|
||||
- Gateway/macOS: reduce noisy loopback WS “closed before connect” logs during tests.
|
||||
|
||||
## 2026.1.12-1
|
||||
|
||||
@@ -182,7 +182,7 @@ describe("image tool implicit imageModel config", () => {
|
||||
|
||||
const res = await tool.execute("t1", {
|
||||
prompt: "Describe the image.",
|
||||
image: "/Users/steipete/.clawdbot/media/inbound/photo.png",
|
||||
image: "@/Users/steipete/.clawdbot/media/inbound/photo.png",
|
||||
});
|
||||
|
||||
expect(fetch).toHaveBeenCalledTimes(1);
|
||||
|
||||
@@ -440,8 +440,11 @@ export function createImageTool(options?: {
|
||||
args && typeof args === "object"
|
||||
? (args as Record<string, unknown>)
|
||||
: {};
|
||||
const imageRaw =
|
||||
const imageRawInput =
|
||||
typeof record.image === "string" ? record.image.trim() : "";
|
||||
const imageRaw = imageRawInput.startsWith("@")
|
||||
? imageRawInput.slice(1).trim()
|
||||
: imageRawInput;
|
||||
if (!imageRaw) throw new Error("image required");
|
||||
const promptRaw =
|
||||
typeof record.prompt === "string" && record.prompt.trim()
|
||||
|
||||
@@ -2446,7 +2446,11 @@ export function resolveDiscordShouldRequireMention(params: {
|
||||
}): boolean {
|
||||
if (!params.isGuildMessage) return false;
|
||||
if (params.isThread && params.channelConfig?.autoThread) return false;
|
||||
return params.channelConfig?.requireMention ?? params.guildInfo?.requireMention ?? true;
|
||||
return (
|
||||
params.channelConfig?.requireMention ??
|
||||
params.guildInfo?.requireMention ??
|
||||
true
|
||||
);
|
||||
}
|
||||
|
||||
export function isDiscordGroupAllowedByPolicy(params: {
|
||||
|
||||
Reference in New Issue
Block a user