mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-19 11:18:37 +00:00
fix(ollama): rename extractImages to extractOllamaImages to avoid duplicate name (#11828)
CI code-size check flags duplicate function names across files. Renamed to avoid collision with ui/src/ui/chat/grouped-render.ts.
This commit is contained in:
committed by
Peter Steinberger
parent
74b173063e
commit
21601bc055
@@ -85,7 +85,7 @@ function extractTextContent(content: unknown): string {
|
|||||||
.join("");
|
.join("");
|
||||||
}
|
}
|
||||||
|
|
||||||
function extractImages(content: unknown): string[] {
|
function extractOllamaImages(content: unknown): string[] {
|
||||||
if (!Array.isArray(content)) {
|
if (!Array.isArray(content)) {
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
@@ -125,7 +125,7 @@ export function convertToOllamaMessages(
|
|||||||
|
|
||||||
if (role === "user") {
|
if (role === "user") {
|
||||||
const text = extractTextContent(msg.content);
|
const text = extractTextContent(msg.content);
|
||||||
const images = extractImages(msg.content);
|
const images = extractOllamaImages(msg.content);
|
||||||
result.push({
|
result.push({
|
||||||
role: "user",
|
role: "user",
|
||||||
content: text,
|
content: text,
|
||||||
|
|||||||
Reference in New Issue
Block a user