mirror of
https://github.com/anthropics/claude-code.git
synced 2026-05-07 15:23:03 +00:00
Compare commits
51 Commits
boris/aier
...
feat/devco
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
07e13937b2 | ||
|
|
55988caadf | ||
|
|
8beb9b0c76 | ||
|
|
4607d83fa8 | ||
|
|
70d5361861 | ||
|
|
c792b7d4c7 | ||
|
|
5f52517c0b | ||
|
|
cc09d58e8e | ||
|
|
eb0e43457b | ||
|
|
b417bfc532 | ||
|
|
2b46e47360 | ||
|
|
c58a7da257 | ||
|
|
239aeb55ee | ||
|
|
f4e707fdcc | ||
|
|
6d79459b16 | ||
|
|
d2f88820c9 | ||
|
|
a3620cdd0b | ||
|
|
da6d2f715e | ||
|
|
f200ab3c5c | ||
|
|
fa29b8f9c0 | ||
|
|
2558619a83 | ||
|
|
80ceacaa78 | ||
|
|
4e63568abd | ||
|
|
5d0b81ae41 | ||
|
|
b1751f2e86 | ||
|
|
eb48d5e4a8 | ||
|
|
fc8c10995f | ||
|
|
01fb7af5b3 | ||
|
|
10a1f7dab9 | ||
|
|
afb0fc9156 | ||
|
|
370a97d939 | ||
|
|
f54569efd2 | ||
|
|
d8cf5a874c | ||
|
|
e499db6e9e | ||
|
|
5300e12135 | ||
|
|
4a04589002 | ||
|
|
04cace9ec0 | ||
|
|
2dbf1e97a0 | ||
|
|
0662600e93 | ||
|
|
27d2c6fdcf | ||
|
|
dd53f86325 | ||
|
|
c40c658e1f | ||
|
|
e05411140d | ||
|
|
ce5b9164fa | ||
|
|
5af0b38a92 | ||
|
|
22946869b2 | ||
|
|
1579216fc7 | ||
|
|
f0042afb3b | ||
|
|
6059607354 | ||
|
|
478f63be73 | ||
|
|
a7edbdc9e7 |
@@ -65,8 +65,8 @@ ENV PATH=$PATH:/usr/local/share/npm-global/bin
|
|||||||
ENV SHELL=/bin/zsh
|
ENV SHELL=/bin/zsh
|
||||||
|
|
||||||
# Set the default editor and visual
|
# Set the default editor and visual
|
||||||
ENV EDITOR nano
|
ENV EDITOR=nano
|
||||||
ENV VISUAL nano
|
ENV VISUAL=nano
|
||||||
|
|
||||||
# Default powerline10k theme
|
# Default powerline10k theme
|
||||||
ARG ZSH_IN_DOCKER_VERSION=1.2.0
|
ARG ZSH_IN_DOCKER_VERSION=1.2.0
|
||||||
|
|||||||
@@ -16,6 +16,7 @@
|
|||||||
"customizations": {
|
"customizations": {
|
||||||
"vscode": {
|
"vscode": {
|
||||||
"extensions": [
|
"extensions": [
|
||||||
|
"anthropic.claude-code",
|
||||||
"dbaeumer.vscode-eslint",
|
"dbaeumer.vscode-eslint",
|
||||||
"esbenp.prettier-vscode",
|
"esbenp.prettier-vscode",
|
||||||
"eamodio.gitlens"
|
"eamodio.gitlens"
|
||||||
@@ -51,5 +52,6 @@
|
|||||||
},
|
},
|
||||||
"workspaceMount": "source=${localWorkspaceFolder},target=/workspace,type=bind,consistency=delegated",
|
"workspaceMount": "source=${localWorkspaceFolder},target=/workspace,type=bind,consistency=delegated",
|
||||||
"workspaceFolder": "/workspace",
|
"workspaceFolder": "/workspace",
|
||||||
"postCreateCommand": "sudo /usr/local/bin/init-firewall.sh"
|
"postStartCommand": "sudo /usr/local/bin/init-firewall.sh",
|
||||||
|
"waitFor": "postStartCommand"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -69,9 +69,12 @@ for domain in \
|
|||||||
"api.anthropic.com" \
|
"api.anthropic.com" \
|
||||||
"sentry.io" \
|
"sentry.io" \
|
||||||
"statsig.anthropic.com" \
|
"statsig.anthropic.com" \
|
||||||
"statsig.com"; do
|
"statsig.com" \
|
||||||
|
"marketplace.visualstudio.com" \
|
||||||
|
"vscode.blob.core.windows.net" \
|
||||||
|
"update.code.visualstudio.com"; do
|
||||||
echo "Resolving $domain..."
|
echo "Resolving $domain..."
|
||||||
ips=$(dig +short A "$domain")
|
ips=$(dig +noall +answer A "$domain" | awk '$4 == "A" {print $5}')
|
||||||
if [ -z "$ips" ]; then
|
if [ -z "$ips" ]; then
|
||||||
echo "ERROR: Failed to resolve $domain"
|
echo "ERROR: Failed to resolve $domain"
|
||||||
exit 1
|
exit 1
|
||||||
@@ -113,6 +116,9 @@ iptables -A OUTPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
|
|||||||
# Then allow only specific outbound traffic to allowed domains
|
# Then allow only specific outbound traffic to allowed domains
|
||||||
iptables -A OUTPUT -m set --match-set allowed-domains dst -j ACCEPT
|
iptables -A OUTPUT -m set --match-set allowed-domains dst -j ACCEPT
|
||||||
|
|
||||||
|
# Explicitly REJECT all other outbound traffic for immediate feedback
|
||||||
|
iptables -A OUTPUT -j REJECT --reject-with icmp-admin-prohibited
|
||||||
|
|
||||||
echo "Firewall configuration complete"
|
echo "Firewall configuration complete"
|
||||||
echo "Verifying firewall rules..."
|
echo "Verifying firewall rules..."
|
||||||
if curl --connect-timeout 5 https://example.com >/dev/null 2>&1; then
|
if curl --connect-timeout 5 https://example.com >/dev/null 2>&1; then
|
||||||
|
|||||||
11
.github/workflows/auto-close-duplicates.yml
vendored
11
.github/workflows/auto-close-duplicates.yml
vendored
@@ -1,5 +1,5 @@
|
|||||||
name: Auto-close duplicate issues (DRY RUN)
|
name: Auto-close duplicate issues
|
||||||
description: Dry run - logs issues that would be auto-closed as duplicates after 3 days if no response
|
description: Auto-closes issues that are duplicates of existing issues
|
||||||
on:
|
on:
|
||||||
schedule:
|
schedule:
|
||||||
- cron: "0 9 * * *"
|
- cron: "0 9 * * *"
|
||||||
@@ -11,20 +11,21 @@ jobs:
|
|||||||
timeout-minutes: 10
|
timeout-minutes: 10
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
issues: read
|
issues: write
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Setup Bun
|
- name: Setup Bun
|
||||||
uses: oven-sh/setup-bun@v2
|
uses: oven-sh/setup-bun@v2
|
||||||
with:
|
with:
|
||||||
bun-version: latest
|
bun-version: latest
|
||||||
|
|
||||||
- name: Auto-close duplicate issues
|
- name: Auto-close duplicate issues
|
||||||
run: bun run scripts/auto-close-duplicates.ts
|
run: bun run scripts/auto-close-duplicates.ts
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
GITHUB_REPOSITORY_OWNER: ${{ github.repository_owner }}
|
GITHUB_REPOSITORY_OWNER: ${{ github.repository_owner }}
|
||||||
GITHUB_REPOSITORY_NAME: ${{ github.event.repository.name }}
|
GITHUB_REPOSITORY_NAME: ${{ github.event.repository.name }}
|
||||||
|
STATSIG_API_KEY: ${{ secrets.STATSIG_API_KEY }}
|
||||||
|
|||||||
57
.github/workflows/claude-dedupe-issues.yml
vendored
57
.github/workflows/claude-dedupe-issues.yml
vendored
@@ -3,6 +3,12 @@ description: Automatically dedupe GitHub issues using Claude Code
|
|||||||
on:
|
on:
|
||||||
issues:
|
issues:
|
||||||
types: [opened]
|
types: [opened]
|
||||||
|
workflow_dispatch:
|
||||||
|
inputs:
|
||||||
|
issue_number:
|
||||||
|
description: 'Issue number to process for duplicate detection'
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
claude-dedupe-issues:
|
claude-dedupe-issues:
|
||||||
@@ -19,7 +25,56 @@ jobs:
|
|||||||
- name: Run Claude Code slash command
|
- name: Run Claude Code slash command
|
||||||
uses: anthropics/claude-code-base-action@beta
|
uses: anthropics/claude-code-base-action@beta
|
||||||
with:
|
with:
|
||||||
prompt: "/dedupe ${{ github.repository }}/issues/${{ github.event.issue.number }}"
|
prompt: "/dedupe ${{ github.repository }}/issues/${{ github.event.issue.number || inputs.issue_number }}"
|
||||||
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
|
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
|
||||||
claude_env: |
|
claude_env: |
|
||||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
- name: Log duplicate comment event to Statsig
|
||||||
|
if: always()
|
||||||
|
env:
|
||||||
|
STATSIG_API_KEY: ${{ secrets.STATSIG_API_KEY }}
|
||||||
|
run: |
|
||||||
|
ISSUE_NUMBER=${{ github.event.issue.number || inputs.issue_number }}
|
||||||
|
REPO=${{ github.repository }}
|
||||||
|
|
||||||
|
if [ -z "$STATSIG_API_KEY" ]; then
|
||||||
|
echo "STATSIG_API_KEY not found, skipping Statsig logging"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Prepare the event payload
|
||||||
|
EVENT_PAYLOAD=$(jq -n \
|
||||||
|
--arg issue_number "$ISSUE_NUMBER" \
|
||||||
|
--arg repo "$REPO" \
|
||||||
|
--arg triggered_by "${{ github.event_name }}" \
|
||||||
|
'{
|
||||||
|
events: [{
|
||||||
|
eventName: "github_duplicate_comment_added",
|
||||||
|
value: 1,
|
||||||
|
metadata: {
|
||||||
|
repository: $repo,
|
||||||
|
issue_number: ($issue_number | tonumber),
|
||||||
|
triggered_by: $triggered_by,
|
||||||
|
workflow_run_id: "${{ github.run_id }}"
|
||||||
|
},
|
||||||
|
time: (now | floor | tostring)
|
||||||
|
}]
|
||||||
|
}')
|
||||||
|
|
||||||
|
# Send to Statsig API
|
||||||
|
echo "Logging duplicate comment event to Statsig for issue #${ISSUE_NUMBER}"
|
||||||
|
|
||||||
|
RESPONSE=$(curl -s -w "\n%{http_code}" -X POST https://events.statsigapi.net/v1/log_event \
|
||||||
|
-H "Content-Type: application/json" \
|
||||||
|
-H "STATSIG-API-KEY: ${STATSIG_API_KEY}" \
|
||||||
|
-d "$EVENT_PAYLOAD")
|
||||||
|
|
||||||
|
HTTP_CODE=$(echo "$RESPONSE" | tail -n1)
|
||||||
|
BODY=$(echo "$RESPONSE" | head -n-1)
|
||||||
|
|
||||||
|
if [ "$HTTP_CODE" -eq 200 ] || [ "$HTTP_CODE" -eq 202 ]; then
|
||||||
|
echo "Successfully logged duplicate comment event for issue #${ISSUE_NUMBER}"
|
||||||
|
else
|
||||||
|
echo "Failed to log duplicate comment event for issue #${ISSUE_NUMBER}. HTTP ${HTTP_CODE}: ${BODY}"
|
||||||
|
fi
|
||||||
|
|||||||
84
.github/workflows/lock-closed-issues.yml
vendored
84
.github/workflows/lock-closed-issues.yml
vendored
@@ -13,16 +13,80 @@ concurrency:
|
|||||||
group: lock-threads
|
group: lock-threads
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
lock-threads:
|
lock-closed-issues:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: dessant/lock-threads@1bf7ec25051fe7c00bdd17e6a7cf3d7bfb7dc771 # v5.0.1
|
- name: Lock closed issues after 7 days of inactivity
|
||||||
|
uses: actions/github-script@v7
|
||||||
with:
|
with:
|
||||||
issue-inactive-days: "7"
|
script: |
|
||||||
process-only: "issues"
|
const sevenDaysAgo = new Date();
|
||||||
log-output: true
|
sevenDaysAgo.setDate(sevenDaysAgo.getDate() - 7);
|
||||||
issue-comment: >
|
|
||||||
This issue has been automatically locked since it was
|
const lockComment = `This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.`;
|
||||||
closed and has not had any activity for 7 days.
|
|
||||||
If you're experiencing a similar issue, please file a new issue
|
let page = 1;
|
||||||
and reference this one if it's relevant.
|
let hasMore = true;
|
||||||
|
let totalLocked = 0;
|
||||||
|
|
||||||
|
while (hasMore) {
|
||||||
|
// Get closed issues (pagination)
|
||||||
|
const { data: issues } = await github.rest.issues.listForRepo({
|
||||||
|
owner: context.repo.owner,
|
||||||
|
repo: context.repo.repo,
|
||||||
|
state: 'closed',
|
||||||
|
sort: 'updated',
|
||||||
|
direction: 'asc',
|
||||||
|
per_page: 100,
|
||||||
|
page: page
|
||||||
|
});
|
||||||
|
|
||||||
|
if (issues.length === 0) {
|
||||||
|
hasMore = false;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
for (const issue of issues) {
|
||||||
|
// Skip if already locked
|
||||||
|
if (issue.locked) continue;
|
||||||
|
|
||||||
|
// Skip pull requests
|
||||||
|
if (issue.pull_request) continue;
|
||||||
|
|
||||||
|
// Check if updated more than 7 days ago
|
||||||
|
const updatedAt = new Date(issue.updated_at);
|
||||||
|
if (updatedAt > sevenDaysAgo) {
|
||||||
|
// Since issues are sorted by updated_at ascending,
|
||||||
|
// once we hit a recent issue, all remaining will be recent too
|
||||||
|
hasMore = false;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
// Add comment before locking
|
||||||
|
await github.rest.issues.createComment({
|
||||||
|
owner: context.repo.owner,
|
||||||
|
repo: context.repo.repo,
|
||||||
|
issue_number: issue.number,
|
||||||
|
body: lockComment
|
||||||
|
});
|
||||||
|
|
||||||
|
// Lock the issue
|
||||||
|
await github.rest.issues.lock({
|
||||||
|
owner: context.repo.owner,
|
||||||
|
repo: context.repo.repo,
|
||||||
|
issue_number: issue.number,
|
||||||
|
lock_reason: 'resolved'
|
||||||
|
});
|
||||||
|
|
||||||
|
totalLocked++;
|
||||||
|
console.log(`Locked issue #${issue.number}: ${issue.title}`);
|
||||||
|
} catch (error) {
|
||||||
|
console.error(`Failed to lock issue #${issue.number}: ${error.message}`);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
page++;
|
||||||
|
}
|
||||||
|
|
||||||
|
console.log(`Total issues locked: ${totalLocked}`);
|
||||||
|
|||||||
40
.github/workflows/log-issue-events.yml
vendored
Normal file
40
.github/workflows/log-issue-events.yml
vendored
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
name: Log Issue Events to Statsig
|
||||||
|
|
||||||
|
on:
|
||||||
|
issues:
|
||||||
|
types: [opened]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
log-to-statsig:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
issues: read
|
||||||
|
steps:
|
||||||
|
- name: Log issue creation to Statsig
|
||||||
|
env:
|
||||||
|
STATSIG_API_KEY: ${{ secrets.STATSIG_API_KEY }}
|
||||||
|
ISSUE_NUMBER: ${{ github.event.issue.number }}
|
||||||
|
REPO: ${{ github.repository }}
|
||||||
|
ISSUE_TITLE: ${{ github.event.issue.title }}
|
||||||
|
AUTHOR: ${{ github.event.issue.user.login }}
|
||||||
|
CREATED_AT: ${{ github.event.issue.created_at }}
|
||||||
|
run: |
|
||||||
|
# All values are now safely passed via environment variables
|
||||||
|
# No direct templating in the shell script to prevent injection attacks
|
||||||
|
|
||||||
|
curl -X POST "https://events.statsigapi.net/v1/log_event" \
|
||||||
|
-H "Content-Type: application/json" \
|
||||||
|
-H "statsig-api-key: $STATSIG_API_KEY" \
|
||||||
|
-d '{
|
||||||
|
"events": [{
|
||||||
|
"eventName": "github_issue_created",
|
||||||
|
"metadata": {
|
||||||
|
"issue_number": "'"$ISSUE_NUMBER"'",
|
||||||
|
"repository": "'"$REPO"'",
|
||||||
|
"title": "'"$(echo "$ISSUE_TITLE" | sed "s/\"/\\\\\"/g")"'",
|
||||||
|
"author": "'"$AUTHOR"'",
|
||||||
|
"created_at": "'"$CREATED_AT"'"
|
||||||
|
},
|
||||||
|
"time": '"$(date +%s)000"'
|
||||||
|
}]
|
||||||
|
}'
|
||||||
75
CHANGELOG.md
75
CHANGELOG.md
@@ -1,5 +1,80 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## 1.0.93
|
||||||
|
|
||||||
|
- Windows: Add alt + v shortcut for pasting images from clipboard
|
||||||
|
|
||||||
|
## 1.0.90
|
||||||
|
|
||||||
|
- Settings file changes take effect immediately - no restart required
|
||||||
|
|
||||||
|
## 1.0.88
|
||||||
|
|
||||||
|
- Fixed issue causing "OAuth authentication is currently not supported"
|
||||||
|
- Status line input now includes `exceeds_200k_tokens`
|
||||||
|
- Fixed incorrect usage tracking in /cost.
|
||||||
|
- Introduced `ANTHROPIC_DEFAULT_SONNET_MODEL` and `ANTHROPIC_DEFAULT_OPUS_MODEL` for controlling model aliases opusplan, opus, and sonnet.
|
||||||
|
- Bedrock: Updated default Sonnet model to Sonnet 4
|
||||||
|
|
||||||
|
## 1.0.86
|
||||||
|
|
||||||
|
- Added /context to help users self-serve debug context issues
|
||||||
|
- SDK: Added UUID support for all SDK messages
|
||||||
|
- SDK: Added `--replay-user-messages` to replay user messages back to stdout
|
||||||
|
|
||||||
|
## 1.0.85
|
||||||
|
|
||||||
|
- Status line input now includes session cost info
|
||||||
|
- Hooks: Introduced SessionEnd hook
|
||||||
|
|
||||||
|
## 1.0.84
|
||||||
|
|
||||||
|
- Fix tool_use/tool_result id mismatch error when network is unstable
|
||||||
|
- Fix Claude sometimes ignoring real-time steering when wrapping up a task
|
||||||
|
- @-mention: Add ~/.claude/\* files to suggestions for easier agent, output style, and slash command editing
|
||||||
|
- Use built-in ripgrep by default; to opt out of this behavior, set USE_BUILTIN_RIPGREP=0
|
||||||
|
|
||||||
|
## 1.0.83
|
||||||
|
|
||||||
|
- @-mention: Support files with spaces in path
|
||||||
|
- New shimmering spinner
|
||||||
|
|
||||||
|
## 1.0.82
|
||||||
|
|
||||||
|
- SDK: Add request cancellation support
|
||||||
|
- SDK: New additionalDirectories option to search custom paths, improved slash command processing
|
||||||
|
- Settings: Validation prevents invalid fields in .claude/settings.json files
|
||||||
|
- MCP: Improve tool name consistency
|
||||||
|
- Bash: Fix crash when Claude tries to automatically read large files
|
||||||
|
|
||||||
|
## 1.0.81
|
||||||
|
|
||||||
|
- Released output styles, including new built-in educational output styles "Explanatory" and "Learning". Docs: https://docs.anthropic.com/en/docs/claude-code/output-styles
|
||||||
|
- Agents: Fix custom agent loading when agent files are unparsable
|
||||||
|
|
||||||
|
## 1.0.80
|
||||||
|
|
||||||
|
- UI improvements: Fix text contrast for custom subagent colors and spinner rendering issues
|
||||||
|
|
||||||
|
## 1.0.77
|
||||||
|
|
||||||
|
- Bash tool: Fix heredoc and multiline string escaping, improve stderr redirection handling
|
||||||
|
- SDK: Add session support and permission denial tracking
|
||||||
|
- Fix token limit errors in conversation summarization
|
||||||
|
- Opus Plan Mode: New setting in `/model` to run Opus only in plan mode, Sonnet otherwise
|
||||||
|
|
||||||
|
## 1.0.73
|
||||||
|
|
||||||
|
- MCP: Support multiple config files with `--mcp-config file1.json file2.json`
|
||||||
|
- MCP: Press Esc to cancel OAuth authentication flows
|
||||||
|
- Bash: Improved command validation and reduced false security warnings
|
||||||
|
- UI: Enhanced spinner animations and status line visual hierarchy
|
||||||
|
- Linux: Added support for Alpine and musl-based distributions (requires separate ripgrep installation)
|
||||||
|
|
||||||
|
## 1.0.72
|
||||||
|
|
||||||
|
- Ask permissions: have Claude Code always ask for confirmation to use specific tools with /permissions
|
||||||
|
|
||||||
## 1.0.71
|
## 1.0.71
|
||||||
|
|
||||||
- Background commands: (Ctrl-b) to run any Bash command in the background so Claude can keep working (great for dev servers, tailing logs, etc.)
|
- Background commands: (Ctrl-b) to run any Bash command in the background so Claude can keep working (great for dev servers, tailing logs, etc.)
|
||||||
|
|||||||
@@ -24,6 +24,10 @@ npm install -g @anthropic-ai/claude-code
|
|||||||
|
|
||||||
We welcome your feedback. Use the `/bug` command to report issues directly within Claude Code, or file a [GitHub issue](https://github.com/anthropics/claude-code/issues).
|
We welcome your feedback. Use the `/bug` command to report issues directly within Claude Code, or file a [GitHub issue](https://github.com/anthropics/claude-code/issues).
|
||||||
|
|
||||||
|
## Connect on Discord
|
||||||
|
|
||||||
|
Join the [Claude Developers Discord](https://anthropic.com/discord) to connect with other developers using Claude Code. Get help, share feedback, and discuss your projects with the community.
|
||||||
|
|
||||||
## Data collection, usage, and retention
|
## Data collection, usage, and retention
|
||||||
|
|
||||||
When you use Claude Code, we collect feedback, which includes usage data (such as code acceptance or rejections), associated conversation data, and user feedback submitted via the `/bug` command.
|
When you use Claude Code, we collect feedback, which includes usage data (such as code acceptance or rejections), associated conversation data, and user feedback submitted via the `/bug` command.
|
||||||
|
|||||||
@@ -40,14 +40,18 @@ Write-Host "Using backend: $($Backend)"
|
|||||||
# --- Prerequisite Check ---
|
# --- Prerequisite Check ---
|
||||||
Write-Host "Checking for required commands..."
|
Write-Host "Checking for required commands..."
|
||||||
try {
|
try {
|
||||||
Get-Command $Backend -ErrorAction Stop | Out-Null
|
if (-not (Get-Command $Backend -ErrorAction SilentlyContinue)) {
|
||||||
|
throw "Required command '$($Backend)' not found."
|
||||||
|
}
|
||||||
Write-Host "- $($Backend) command found."
|
Write-Host "- $($Backend) command found."
|
||||||
Get-Command devcontainer -ErrorAction Stop | Out-Null
|
if (-not (Get-Command devcontainer -ErrorAction SilentlyContinue)) {
|
||||||
|
throw "Required command 'devcontainer' not found."
|
||||||
|
}
|
||||||
Write-Host "- devcontainer command found."
|
Write-Host "- devcontainer command found."
|
||||||
}
|
}
|
||||||
catch {
|
catch {
|
||||||
Write-Error "A required command is not installed or not in your PATH."
|
Write-Error "A required command is not installed or not in your PATH. $($_.Exception.Message)"
|
||||||
Write-Error "Please ensure '$($_.Exception.Message.Split(':')[0])' and 'devcontainer' are installed and accessible."
|
Write-Error "Please ensure both '$Backend' and 'devcontainer' are installed and accessible in your system's PATH."
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -47,10 +47,22 @@ async function githubRequest<T>(endpoint: string, token: string, method: string
|
|||||||
}
|
}
|
||||||
|
|
||||||
function extractDuplicateIssueNumber(commentBody: string): number | null {
|
function extractDuplicateIssueNumber(commentBody: string): number | null {
|
||||||
const match = commentBody.match(/#(\d+)/);
|
// Try to match #123 format first
|
||||||
return match ? parseInt(match[1], 10) : null;
|
let match = commentBody.match(/#(\d+)/);
|
||||||
|
if (match) {
|
||||||
|
return parseInt(match[1], 10);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Try to match GitHub issue URL format: https://github.com/owner/repo/issues/123
|
||||||
|
match = commentBody.match(/github\.com\/[^\/]+\/[^\/]+\/issues\/(\d+)/);
|
||||||
|
if (match) {
|
||||||
|
return parseInt(match[1], 10);
|
||||||
|
}
|
||||||
|
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
async function closeIssueAsDuplicate(
|
async function closeIssueAsDuplicate(
|
||||||
owner: string,
|
owner: string,
|
||||||
repo: string,
|
repo: string,
|
||||||
@@ -64,7 +76,8 @@ async function closeIssueAsDuplicate(
|
|||||||
'PATCH',
|
'PATCH',
|
||||||
{
|
{
|
||||||
state: 'closed',
|
state: 'closed',
|
||||||
state_reason: 'not_planned'
|
state_reason: 'duplicate',
|
||||||
|
labels: ['duplicate']
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -80,6 +93,7 @@ If this is incorrect, please re-open this issue or create a new one.
|
|||||||
🤖 Generated with [Claude Code](https://claude.ai/code)`
|
🤖 Generated with [Claude Code](https://claude.ai/code)`
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async function autoCloseDuplicates(): Promise<void> {
|
async function autoCloseDuplicates(): Promise<void> {
|
||||||
|
|||||||
Reference in New Issue
Block a user