MCPcopy Create free account
hub / github.com/Noumena-Network/code / startsWithApiErrorPrefix

Function startsWithApiErrorPrefix

src/services/api/errors.ts:54–59  ·  view source on GitHub ↗
(text: string)

Source from the content-addressed store, hash-verified

52export const API_ERROR_MESSAGE_PREFIX = 'API Error'
53
54export function startsWithApiErrorPrefix(text: string): boolean {
55 return (
56 text.startsWith(API_ERROR_MESSAGE_PREFIX) ||
57 text.startsWith(`Please run /login · ${API_ERROR_MESSAGE_PREFIX}`)
58 )
59}
60export const PROMPT_TOO_LONG_ERROR_MESSAGE = 'Prompt is too long'
61
62export function isPromptTooLongMessage(msg: AssistantMessage): boolean {

Callers 5

generateTitleFunction · 0.85
AssistantTextMessageFunction · 0.85
getCommandPrefixImplFunction · 0.85
compactConversationFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected