ed91e47107
- 添加项目配置文件(tsconfig.json、bunfig.toml、.gitignore、.env.example) - 创建文档架构图(00runtime.png 至 08-state-data-flow.png) - 添加核心工具常量定义(FileEditTool、AgentTool、BashTool 等) - 实现基础命令框架(help、exit、config、model 等) - 添加 Ink TUI 组件库和布局引擎 - 包含内存管理、沙箱、shell 工具等基础工具类 - 设置预加载脚本和版本信息
27 lines
931 B
TypeScript
27 lines
931 B
TypeScript
import type { Command } from '../../commands.js'
|
|
import { isPolicyAllowed } from '../../services/policyLimits/index.js'
|
|
import { isEnvTruthy } from '../../utils/envUtils.js'
|
|
import { isEssentialTrafficOnly } from '../../utils/privacyLevel.js'
|
|
|
|
const feedback = {
|
|
aliases: ['bug'],
|
|
type: 'local-jsx',
|
|
name: 'feedback',
|
|
description: `Submit feedback about Claude Code`,
|
|
argumentHint: '[report]',
|
|
isEnabled: () =>
|
|
!(
|
|
isEnvTruthy(process.env.CLAUDE_CODE_USE_BEDROCK) ||
|
|
isEnvTruthy(process.env.CLAUDE_CODE_USE_VERTEX) ||
|
|
isEnvTruthy(process.env.CLAUDE_CODE_USE_FOUNDRY) ||
|
|
isEnvTruthy(process.env.DISABLE_FEEDBACK_COMMAND) ||
|
|
isEnvTruthy(process.env.DISABLE_BUG_COMMAND) ||
|
|
isEssentialTrafficOnly() ||
|
|
process.env.USER_TYPE === 'ant' ||
|
|
!isPolicyAllowed('allow_product_feedback')
|
|
),
|
|
load: () => import('./feedback.js'),
|
|
} satisfies Command
|
|
|
|
export default feedback
|