mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-17 08:02:12 -06:00
1d999b817f
* fix(anthropic): reject invalid Claude session cursors * fix(anthropic): validate Claude session cursors exactly * fix(anthropic): route cursor test through catalog provider * fix(anthropic): validate Claude session cursors exactly Co-authored-by: qingminlong <qing.minlong@xydigit.com> * fix(anthropic): keep cursor limit private --------- Co-authored-by: Peter Steinberger <steipete@gmail.com>
11 lines
283 B
TypeScript
11 lines
283 B
TypeScript
const CLAUDE_SESSION_CURSOR_MAX_LENGTH = 256;
|
|
|
|
export function isExactClaudeSessionCursor(value: unknown): value is string {
|
|
return (
|
|
typeof value === "string" &&
|
|
value.length > 0 &&
|
|
value.length <= CLAUDE_SESSION_CURSOR_MAX_LENGTH &&
|
|
value === value.trim()
|
|
);
|
|
}
|