hardening: isolate third-party paths and clean external-build metadata (#311)
* hardening: isolate third-party paths and clean external-build metadata * fix: restore external feedback flow and make privacy check portable
This commit is contained in:
@@ -1198,9 +1198,14 @@ export function getErrorMessageIfRefusal(
|
||||
|
||||
logEvent('tengu_refusal_api_response', {})
|
||||
|
||||
const usagePolicyUrl =
|
||||
getAPIProvider() === 'firstParty'
|
||||
? 'https://www.anthropic.com/legal/aup'
|
||||
: "your provider's acceptable use policy"
|
||||
|
||||
const baseMessage = getIsNonInteractiveSession()
|
||||
? `${API_ERROR_MESSAGE_PREFIX}: Claude Code is unable to respond to this request, which appears to violate our Usage Policy (https://www.anthropic.com/legal/aup). Try rephrasing the request or attempting a different approach.`
|
||||
: `${API_ERROR_MESSAGE_PREFIX}: Claude Code is unable to respond to this request, which appears to violate our Usage Policy (https://www.anthropic.com/legal/aup). Please double press esc to edit your last message or start a new session for Claude Code to assist with a different task.`
|
||||
? `${API_ERROR_MESSAGE_PREFIX}: Claude Code is unable to respond to this request, which appears to violate our Usage Policy (${usagePolicyUrl}). Try rephrasing the request or attempting a different approach.`
|
||||
: `${API_ERROR_MESSAGE_PREFIX}: Claude Code is unable to respond to this request, which appears to violate our Usage Policy (${usagePolicyUrl}). Please double press esc to edit your last message or start a new session for Claude Code to assist with a different task.`
|
||||
|
||||
const modelSuggestion =
|
||||
model !== 'claude-sonnet-4-20250514'
|
||||
|
||||
Reference in New Issue
Block a user