MCPcopy Create free account
hub / github.com/ChatGPTBox-dev/chatGPTBox / isPromptOrSelectionLikeKey

Function isPromptOrSelectionLikeKey

src/background/redact.mjs:12–22  ·  view source on GitHub ↗
(lowerKey)

Source from the content-addressed store, hash-verified

10]
11
12export function isPromptOrSelectionLikeKey(lowerKey) {
13 lowerKey = lowerKey.toLowerCase()
14 const normalizedKey = lowerKey.replace(/[^a-z0-9]/g, '')
15 return (
16 normalizedKey.endsWith('question') ||
17 normalizedKey.endsWith('prompt') ||
18 normalizedKey.endsWith('query') ||
19 normalizedKey === 'selection' ||
20 normalizedKey === 'selectiontext'
21 )
22}
23
24export function redactSensitiveFields(obj, recursionDepth = 0, maxDepth = 5, seen = new WeakSet()) {
25 if (recursionDepth > maxDepth) {

Callers 2

redact.test.mjsFile · 0.90
redactSensitiveFieldsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected