mirror of
https://github.com/claude-code-best/claude-code.git
synced 2026-06-18 14:25:51 +00:00
fix: 批量修正 external 字面量
This commit is contained in:
@@ -81,7 +81,7 @@ export type AutoRunIssueReason = 'feedback_survey_bad' | 'feedback_survey_good';
|
||||
*/
|
||||
export function shouldAutoRunIssue(reason: AutoRunIssueReason): boolean {
|
||||
// Only for Ant users
|
||||
if (("external" as string) !== 'ant') {
|
||||
if ((process.env.USER_TYPE) !== 'ant') {
|
||||
return false;
|
||||
}
|
||||
switch (reason) {
|
||||
@@ -100,7 +100,7 @@ export function shouldAutoRunIssue(reason: AutoRunIssueReason): boolean {
|
||||
*/
|
||||
export function getAutoRunCommand(reason: AutoRunIssueReason): string {
|
||||
// Only ant builds have the /good-claude command
|
||||
if (("external" as string) === 'ant' && reason === 'feedback_survey_good') {
|
||||
if ((process.env.USER_TYPE) === 'ant' && reason === 'feedback_survey_good') {
|
||||
return '/good-claude';
|
||||
}
|
||||
return '/issue';
|
||||
|
||||
@@ -273,7 +273,7 @@ async function executeForkedSlashCommand(command: CommandBase & PromptCommand, a
|
||||
logForDebugging(`Forked slash command /${command.name} completed with agent ${agentId}`);
|
||||
|
||||
// Prepend debug log for ant users so it appears inside the command output
|
||||
if (("external" as string) === 'ant') {
|
||||
if ((process.env.USER_TYPE) === 'ant') {
|
||||
resultText = `[ANT-ONLY] API calls: ${getDisplayPath(getDumpPromptsPath(agentId))}\n${resultText}`;
|
||||
}
|
||||
|
||||
@@ -427,7 +427,7 @@ export async function processSlashCommand(inputString: string, precedingInputBlo
|
||||
logEvent('tengu_input_command', {
|
||||
...eventData,
|
||||
invocation_trigger: 'user-slash' as AnalyticsMetadata_I_VERIFIED_THIS_IS_NOT_CODE_OR_FILEPATHS,
|
||||
...(("external" as string) === 'ant' && {
|
||||
...((process.env.USER_TYPE) === 'ant' && {
|
||||
skill_name: commandName as AnalyticsMetadata_I_VERIFIED_THIS_IS_NOT_CODE_OR_FILEPATHS,
|
||||
...(returnedCommand.type === 'prompt' && {
|
||||
skill_source: returnedCommand.source as AnalyticsMetadata_I_VERIFIED_THIS_IS_NOT_CODE_OR_FILEPATHS
|
||||
@@ -495,7 +495,7 @@ export async function processSlashCommand(inputString: string, precedingInputBlo
|
||||
logEvent('tengu_input_command', {
|
||||
...eventData,
|
||||
invocation_trigger: 'user-slash' as AnalyticsMetadata_I_VERIFIED_THIS_IS_NOT_CODE_OR_FILEPATHS,
|
||||
...(("external" as string) === 'ant' && {
|
||||
...((process.env.USER_TYPE) === 'ant' && {
|
||||
skill_name: commandName as AnalyticsMetadata_I_VERIFIED_THIS_IS_NOT_CODE_OR_FILEPATHS,
|
||||
...(returnedCommand.type === 'prompt' && {
|
||||
skill_source: returnedCommand.source as AnalyticsMetadata_I_VERIFIED_THIS_IS_NOT_CODE_OR_FILEPATHS
|
||||
|
||||
@@ -26,7 +26,7 @@ export type Property = {
|
||||
};
|
||||
export type Diagnostic = React.ReactNode;
|
||||
export function buildSandboxProperties(): Property[] {
|
||||
if (("external" as string) !== 'ant') {
|
||||
if ((process.env.USER_TYPE) !== 'ant') {
|
||||
return [];
|
||||
}
|
||||
const isSandboxed = SandboxManager.isSandboxingEnabled();
|
||||
|
||||
Reference in New Issue
Block a user