test: add unit tests and remove dead code
- Add vitest with 98 tests across 6 test files covering: - cosy.ts: URL builders, mode detection, model name mapping - thinking-parser.ts: ThinkingTagParser with all tag variants and chunked streaming - transform.ts: getContentText, transformTools, transformMessagesForQoder - pat.ts: isPatRefresh, encodePatRefresh/decodePatRefresh roundtrip - qoder-encoding.ts: custom encoding correctness and edge cases - models.ts: static model definitions integrity checks - Remove dead code: - QODER_CN_DIRECT_BASE_URL (unused export in cosy.ts) - THINKING_START_TAG / THINKING_END_TAG (unused constants in thinking-parser.ts) - Add test/test:watch scripts to package.json
This commit is contained in:
@@ -70,8 +70,6 @@ export function getQoderBaseUrl(mode?: string): string {
|
||||
return isQoderCNMode(mode) ? "https://gateway.qoder.com.cn/" : "https://api3.qoder.sh/";
|
||||
}
|
||||
|
||||
export const QODER_CN_DIRECT_BASE_URL = getQoderBaseUrl("cn");
|
||||
|
||||
export function getQoderOpenApiUrl(mode?: string): string {
|
||||
return isQoderCNMode(mode) ? "https://openapi.qoder.com.cn" : "https://openapi.qoder.sh";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user