MCPcopy Create free account
hub / github.com/Gan-Xing/CodexBridge / isExplicitAssistantCreateRequest

Function isExplicitAssistantCreateRequest

src/core/bridge_coordinator.ts:17334–17341  ·  view source on GitHub ↗
(input: string)

Source from the content-addressed store, hash-verified

17332}
17333
17334function isExplicitAssistantCreateRequest(input: string): boolean {
17335 const value = compactWhitespace(input);
17336 if (!value) {
17337 return false;
17338 }
17339 return /(?:^|[,,。;;\s])(?:新增|新建|添加|增加|记一条新的|记一个新的|新记一条|再记一条|再加一条|另记一条|另加一条).{0,24}(?:待办|todo|提醒|reminder|日志|log|笔记|note|事项|任务)/u.test(value)
17340 || /^(?:新增|新建|添加|增加)(?:一个|一条)?(?:待办|todo|提醒|reminder|日志|log|笔记|note)/u.test(value);
17341}
17342
17343function shouldCreateAssistantRecordInsteadOfUpdating(input: string): boolean {
17344 const value = compactWhitespace(input);

Calls 1

compactWhitespaceFunction · 0.70

Tested by

no test coverage detected