refactor: trim extension helper exports · openclaw/openclaw@bccd50b
steipete
·
2026-05-02
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -213,14 +213,6 @@ export function clearSession(accountId: string): void {
|
213 | 213 | } |
214 | 214 | } |
215 | 215 | |
216 | | -/** Update only lastSeq on the persisted session. */ |
217 | | -export function updateLastSeq(accountId: string, lastSeq: number): void { |
218 | | -const existing = loadSession(accountId); |
219 | | -if (existing?.sessionId) { |
220 | | -saveSession({ ...existing, lastSeq }); |
221 | | -} |
222 | | -} |
223 | | - |
224 | 216 | /** Load all saved sessions from disk. */ |
225 | 217 | export function getAllSessions(): SessionState[] { |
226 | 218 | const sessions = new Map<string, SessionState>(); |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -151,18 +151,6 @@ export async function sendGroupMessageWithStory({
|
151 | 151 | return { channel: "tlon", messageId: `${fromShip}/${sentAt}` }; |
152 | 152 | } |
153 | 153 | |
154 | | -export function buildMediaText(text: string | undefined, mediaUrl: string | undefined): string { |
155 | | -const cleanText = text?.trim() ?? ""; |
156 | | -const cleanUrl = mediaUrl?.trim() ?? ""; |
157 | | -if (cleanText && cleanUrl) { |
158 | | -return `${cleanText}\n${cleanUrl}`; |
159 | | -} |
160 | | -if (cleanUrl) { |
161 | | -return cleanUrl; |
162 | | -} |
163 | | -return cleanText; |
164 | | -} |
165 | | - |
166 | 154 | /** |
167 | 155 | * Build a story with text and optional media (image) |
168 | 156 | */ |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -18,7 +18,7 @@ function extractUrlCitations(annotations: unknown): string[] {
|
18 | 18 | .map((annotation) => annotation.url as string); |
19 | 19 | } |
20 | 20 | |
21 | | -export const XAI_RESPONSES_BASE_URL = "https://api.x.ai/v1"; |
| 21 | +const XAI_RESPONSES_BASE_URL = "https://api.x.ai/v1"; |
22 | 22 | export const XAI_RESPONSES_ENDPOINT = `${XAI_RESPONSES_BASE_URL}/responses`; |
23 | 23 | |
24 | 24 | function trimString(value: unknown): string | undefined { |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。