Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
8ed1a08
feat: improve template selection reliability and prompt clarity
AshishKumar4 Nov 4, 2025
834cffa
fix: better stale comment removal + correct YAML string escaping
AshishKumar4 Nov 4, 2025
718b00e
refactor: improve generation state handling on reconnect and cancella…
AshishKumar4 Nov 6, 2025
d3f984c
fix: typeScript features configurable to reduce memory
AshishKumar4 Nov 6, 2025
0dd3e7e
fix: don't wait for runtime errors if app not deployed
AshishKumar4 Nov 6, 2025
d51310b
fix: unescape commit messages before git operations
AshishKumar4 Nov 6, 2025
188ba0d
fix: prevent race condition in code generation state
AshishKumar4 Nov 6, 2025
9d5a178
Merge pull request #220 from cloudflare/fix/general-patches-2
AshishKumar4 Nov 6, 2025
fc34077
refactor: generalize coding agent to behavior + business; part 1
AshishKumar4 Nov 7, 2025
d6407e1
chore(main): release 1.0.0
github-actions[bot] Nov 3, 2025
8950852
feat: enhance changelog generation with detailed PR and commit data
AshishKumar4 Nov 3, 2025
774ee42
chore(main): release 1.1.0
github-actions[bot] Nov 4, 2025
a840c74
Fix typos
justingray0 Nov 8, 2025
3544038
fix: added instructions for token creation
roerohan Nov 17, 2025
b74a645
fix: add additional ownership verification checks
AshishKumar4 Nov 17, 2025
3a0f1f0
Merge branch 'main' of github.com:cloudflare/vibesdk into nightly
AshishKumar4 Nov 17, 2025
2ad8fd5
Merge branch 'nightly' of github.com:cloudflare/vibesdk into fix/patc…
AshishKumar4 Nov 17, 2025
0dfa868
Merge branch 'nightly' of github.com:cloudflare/orange-builds into ni…
AshishKumar4 Nov 17, 2025
c090178
Merge pull request #242 from cloudflare/fix/patch-github-token-caching
AshishKumar4 Nov 17, 2025
df4089a
Merge branch 'nightly' of github.com:cloudflare/orange-builds into ni…
AshishKumar4 Nov 17, 2025
14219b0
refactor: always use httpOnly cookie, no need for arg
AshishKumar4 Nov 17, 2025
5358219
chore: remove useless hardcoded ai message on bootstrap
AshishKumar4 Nov 17, 2025
1eda73e
fix: dont clear runtime errors on executeDeepDebug
AshishKumar4 Nov 17, 2025
a28bf9f
chore: updated rate limit configs
AshishKumar4 Nov 17, 2025
9d181cf
Revert "refactor: generalize coding agent to behavior + business; par…
AshishKumar4 Nov 18, 2025
670c8d6
fix: cleanup chat.tsx for build
AshishKumar4 Nov 18, 2025
3f9ccf7
feat: add agent-specific model constraints and refactor generation
AshishKumar4 Nov 21, 2025
bbc6b1d
refactor: improve static analysis caching and finalization phase gene…
AshishKumar4 Nov 21, 2025
2b3a901
Feat: Cost optimizations via model configs and prompt improvements (#…
AshishKumar4 Nov 22, 2025
38b0e8a
Merge pull request #251 from cloudflare/feat/proper-finalization
AshishKumar4 Nov 22, 2025
7b90c82
refactor: extract model config info logic to service layer and improv…
AshishKumar4 Nov 22, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/claude-issue-triage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ jobs:

### STAGE 3: Solution Proposal (CONDITIONAL)${{ steps.analyze.outputs.severity == 'high' && '\n\n**⚠️ REQUIRED** - Critical issue, must propose fix' || '\n\n**OPTIONAL** - Propose fix if solution is clear and straightforward' }}

${{ steps.analyze.outputs.severity == 'high' && '**You MUST propose a fix for this critical issue:**' || '**Propose a fix only if:**\n- Root cause is clear\n- Fix is straightforward (< 50 lines changed)\n- You\'re confident it won\'t introduce regressions' }}
${{ steps.analyze.outputs.severity == 'high' && '**You MUST propose a fix for this critical issue:**' || '**Propose a fix only if:**\n- Root cause is clear\n- Fix is straightforward (< 50 lines changed)\n- You''re confident it won''t introduce regressions' }}

#### 3.1 Design the Fix

Expand Down Expand Up @@ -249,7 +249,7 @@ jobs:

**Comment Structure** (adapt based on investigation depth):

${{ steps.analyze.outputs.should_investigate == 'true' && '**For investigated issues:**\n\n```markdown\n## Investigation Results\n\nThanks for reporting this, @${{ github.event.issue.user.login }}! I\'ve performed a thorough analysis.\n\n### Classification\n- **Type:** [bug/feature/etc]\n- **Severity:** [P0-critical/P1-high/etc]\n- **Component:** [worker/ui/etc]\n\n### Root Cause Analysis\n[Detailed explanation of what\'s causing the issue]\n\n**Location:** `path/to/file.ts:123`\n\n**Introduced in:** PR #XXX (if found) or Commit ABC123\n\n### Proposed Solution\n[Explain the fix approach]\n\n### Status\n- ✅ PR #XXX created with proposed fix (if applicable)\n- ⏳ Requires manual review and testing\n- 📋 Added to backlog for team review (if no PR)\n\n### Next Steps\n[What happens next - PR review, team discussion, etc.]\n```' || '**For standard triage:**\n\n```markdown\nThanks for reporting this, @${{ github.event.issue.user.login }}!\n\n### Classification\n- **Labels:** [list applied labels]\n- **Priority:** [explanation of priority]\n\n[Context-specific response based on issue type]\n\n### Next Steps\nThe team will review this and provide updates.\n```' }}
${{ steps.analyze.outputs.should_investigate == 'true' && '**For investigated issues:**\n\n```markdown\n## Investigation Results\n\nThanks for reporting this, @${{ github.event.issue.user.login }}! I''ve performed a thorough analysis.\n\n### Classification\n- **Type:** [bug/feature/etc]\n- **Severity:** [P0-critical/P1-high/etc]\n- **Component:** [worker/ui/etc]\n\n### Root Cause Analysis\n[Detailed explanation of what''s causing the issue]\n\n**Location:** `path/to/file.ts:123`\n\n**Introduced in:** PR #XXX (if found) or Commit ABC123\n\n### Proposed Solution\n[Explain the fix approach]\n\n### Status\n- ✅ PR #XXX created with proposed fix (if applicable)\n- ⏳ Requires manual review and testing\n- 📋 Added to backlog for team review (if no PR)\n\n### Next Steps\n[What happens next - PR review, team discussion, etc.]\n```' || '**For standard triage:**\n\n```markdown\nThanks for reporting this, @${{ github.event.issue.user.login }}!\n\n### Classification\n- **Labels:** [list applied labels]\n- **Priority:** [explanation of priority]\n\n[Context-specific response based on issue type]\n\n### Next Steps\nThe team will review this and provide updates.\n```' }}

---

Expand Down
75 changes: 40 additions & 35 deletions .github/workflows/claude-reviews.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,32 +45,6 @@ jobs:
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Minimize Old Review Comments
run: |
echo "Collapsing previous review comments from github-actions[bot]..."

# Get all comments from github-actions[bot] on this PR
OLD_REVIEWS=$(gh api repos/${{ github.repository }}/issues/${{ github.event.pull_request.number }}/comments \
--jq '[.[] | select(.user.login == "github-actions[bot]") | select(.body | contains("## Code Review") or contains("🔒 **CRITICAL PATH SECURITY REVIEW**") or contains("## 🔍 Code Quality & Security Review")) | .id]')

if [ -n "$OLD_REVIEWS" ] && [ "$OLD_REVIEWS" != "[]" ]; then
echo "Found old review comments to collapse"
echo "$OLD_REVIEWS" | jq -r '.[]' | while read comment_id; do
echo "Collapsing comment $comment_id"
gh api repos/${{ github.repository }}/issues/comments/$comment_id -X PATCH \
-f body="<details><summary>🔒 Previous review (outdated)</summary>

This review has been superseded by a newer review.
</details>" || echo "Failed to collapse comment $comment_id"
done
echo "✓ Old comments collapsed"
else
echo "No old review comments found"
fi
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
continue-on-error: true

- name: Run Comprehensive Review
uses: anthropics/claude-code-action@v1
with:
Expand Down Expand Up @@ -137,16 +111,8 @@ jobs:
[Overall assessment with approval/disapproval reasoning]
```

5. Post review (MANDATORY FINAL STEP - use single efficient command)
5. Post review (MANDATORY FINAL STEP)
```bash
# Post new review (collapse old ones first if any exist)
OLD_IDS=$(gh api repos/${{ github.repository }}/issues/${{ github.event.pull_request.number }}/comments --jq '[.[] | select(.user.login == "github-actions[bot]") | select(.body | startswith("## Code & Security Review")) | .id] | @csv' | tr -d '"')
if [ -n "$OLD_IDS" ]; then
for id in ${OLD_IDS//,/ }; do
gh api -X PATCH repos/${{ github.repository }}/issues/comments/$id -f body="<details><summary>Outdated</summary></details>" &
done
wait
fi
gh pr comment ${{ github.event.pull_request.number }} --repo ${{ github.repository }} --body "YOUR_REVIEW_HERE"
```

Expand Down Expand Up @@ -180,3 +146,42 @@ jobs:
--allowed-tools "mcp__github_inline_comment__create_inline_comment,Bash(gh issue view:*),Bash(gh issue list:*),Bash(gh search:*),Bash(gh pr comment:*),Bash(gh pr diff:*),Bash(gh pr view:*),Bash(gh pr edit:*),Bash(gh api:*)"
--max-turns ${{ steps.critical_paths.outputs.is_critical == 'true' && '90' || '65' }}
--model claude-sonnet-4-5-20250929

- name: Intelligent Comment Cleanup
uses: anthropics/claude-code-action@v1
if: always()
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
prompt: |
Clean up stale bot comments on PR #${{ github.event.pull_request.number }}.

**Task:**
1. Fetch all comments on this PR
2. Identify bot comments (users ending in [bot]) that are stale/outdated:
- Old reviews superseded by newer ones
- Old PR description suggestions
- Previously collapsed/outdated markers
- Progress/status comments from previous workflow runs
3. Keep only the most recent comment per category per bot
4. DELETE all stale comments (do not collapse)

**Get all comments:**
```bash
gh api repos/${{ github.repository }}/issues/${{ github.event.pull_request.number }}/comments --jq '.[] | {id, user: .user.login, body, created_at}'
```

**Delete a comment:**
```bash
gh api repos/${{ github.repository }}/issues/comments/COMMENT_ID -X DELETE
```

Be intelligent:
- Preserve the newest useful comment in each category
- Delete everything else that's redundant or stale
- If unsure, keep the comment (conservative approach)

claude_args: |
--allowed-tools "Bash(gh api repos/*/issues/*/comments:*),Bash(gh api repos/*/issues/comments/*:*)"
--max-turns 8
--model claude-haiku-4-5-20251001
11 changes: 10 additions & 1 deletion .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -1 +1,10 @@
bunx commitlint --edit $1
# Add common bun installation paths to PATH
export PATH="/opt/homebrew/bin:$HOME/.bun/bin:$PATH"

# Run commitlint if bunx is available
if command -v bunx >/dev/null 2>&1; then
bunx commitlint --edit $1
else
echo "⚠️ bunx not found in PATH, skipping commitlint"
exit 0
fi
11 changes: 10 additions & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1 +1,10 @@
bun test
# Add common bun installation paths to PATH
export PATH="/opt/homebrew/bin:$HOME/.bun/bin:$PATH"

# Run tests with bun
if command -v bun >/dev/null 2>&1; then
bun test
else
echo "⚠️ bun not found in PATH, skipping tests"
exit 0
fi
1 change: 0 additions & 1 deletion SandboxDockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ RUN chmod 755 /workspace/data
# Set environment variable to indicate Docker container environment
ENV CONTAINER_ENV=docker
ENV VITE_LOGGER_TYPE=json

# # Set environment variable to indicate Docker container environment
# ENV CONTAINER_ENV=docker

Expand Down
5 changes: 4 additions & 1 deletion src/api-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,10 @@ export type {
export type {
WebSocketMessage,
WebSocketMessageData,
CodeFixEdits
CodeFixEdits,
ModelConfigsInfoMessage,
AgentDisplayConfig,
ModelConfigsInfo
} from 'worker/api/websocketTypes';

// Database/Schema Types commonly used in frontend
Expand Down
3 changes: 1 addition & 2 deletions src/components/config-card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ import { Button } from '@/components/ui/button';
import { Badge } from '@/components/ui/badge';
import { Card, CardContent, CardHeader } from '@/components/ui/card';
import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from '@/components/ui/tooltip';
import type { ModelConfig, UserModelConfigWithMetadata } from '@/api-types';
import type { AgentDisplayConfig } from './model-config-tabs';
import type { AgentDisplayConfig, ModelConfig, UserModelConfigWithMetadata } from '@/api-types';

interface ConfigCardProps {
agent: AgentDisplayConfig;
Expand Down
90 changes: 40 additions & 50 deletions src/components/config-modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ import type {
UserModelConfigWithMetadata,
ModelConfigUpdate,
AIModels,
ByokProvidersData
ByokProvidersData,
AgentDisplayConfig
} from '@/api-types';
import type { AgentDisplayConfig } from './model-config-tabs';

interface ConfigModalProps {
isOpen: boolean;
Expand Down Expand Up @@ -68,18 +68,18 @@ const getModelDisplayName = (model: AIModels | string): string => {
// Model recommendations by agent
const getModelRecommendation = (agentAction: string) => {
const recommendations: Record<string, string> = {
templateSelection: '💡 Recommended: Fast models for quick template selection',
blueprint: '🏗️ Recommended: Creative models for architecture design',
projectSetup: '⚙️ Recommended: Reliable models for precise setup',
phaseGeneration: '📋 Recommended: Large context models for comprehensive planning',
firstPhaseImplementation: '🏁 Recommended: High-capability models for foundation development',
phaseImplementation: 'Recommended: Strong coding models for implementation',
realtimeCodeFixer: '🚀 Recommended: Fast debugging models',
fastCodeFixer: 'Recommended: Ultra-fast models for quick fixes',
conversationalResponse: '💬 Recommended: Balanced models for natural conversation',
codeReview: '🔍 Recommended: Analytical models with large context',
fileRegeneration: '📝 Recommended: Pure coding models',
screenshotAnalysis: '👁️ Recommended: Vision-capable models for image analysis'
templateSelection: 'Recommended: Fast models for quick template selection',
blueprint: 'Recommended: Creative models for architecture design',
projectSetup: 'Recommended: Reliable models for precise setup',
phaseGeneration: 'Recommended: Large context models for comprehensive planning',
firstPhaseImplementation: 'Recommended: High-capability models for foundation development',
phaseImplementation: 'Recommended: Strong coding models for implementation',
realtimeCodeFixer: 'Recommended: Fast debugging models',
fastCodeFixer: 'Recommended: Ultra-fast models for quick fixes',
conversationalResponse: 'Recommended: Balanced models for natural conversation',
codeReview: 'Recommended: Analytical models with large context',
fileRegeneration: 'Recommended: Pure coding models',
screenshotAnalysis: 'Recommended: Vision-capable models for image analysis'
};
return recommendations[agentAction] || '';
};
Expand All @@ -98,7 +98,6 @@ export function ConfigModal({
// Form state
const [formData, setFormData] = useState({
modelName: userConfig?.name || 'default',
maxTokens: userConfig?.max_tokens?.toString() || '',
temperature: userConfig?.temperature?.toString() || '',
reasoningEffort: userConfig?.reasoning_effort || 'default',
fallbackModel: userConfig?.fallbackModel || 'default'
Expand All @@ -115,11 +114,12 @@ export function ConfigModal({
const [byokData, setByokData] = useState<ByokProvidersData | null>(null);
const [loadingByok, setLoadingByok] = useState(false);

// Load BYOK data
// Load BYOK data (filtered by agent constraints)
const loadByokData = async () => {
try {
setLoadingByok(true);
const response = await apiClient.getByokProviders();
// Pass agent key to get constraint-filtered models
const response = await apiClient.getByokProviders(agentConfig.key);
if (response.success && response.data) {
setByokData(response.data);
}
Expand All @@ -136,7 +136,6 @@ export function ConfigModal({
// First time opening - reset everything and load data
setFormData({
modelName: userConfig?.name || 'default',
maxTokens: userConfig?.max_tokens?.toString() || '',
temperature: userConfig?.temperature?.toString() || '',
reasoningEffort: userConfig?.reasoning_effort || 'default',
fallbackModel: userConfig?.fallbackModel || 'default'
Expand All @@ -162,7 +161,6 @@ export function ConfigModal({
useEffect(() => {
const originalFormData = {
modelName: userConfig?.name || 'default',
maxTokens: userConfig?.max_tokens?.toString() || '',
temperature: userConfig?.temperature?.toString() || '',
reasoningEffort: userConfig?.reasoning_effort || 'default',
fallbackModel: userConfig?.fallbackModel || 'default'
Expand Down Expand Up @@ -246,7 +244,6 @@ export function ConfigModal({
const buildCurrentConfig = (): ModelConfigUpdate => {
return {
...(formData.modelName !== 'default' && { modelName: formData.modelName }),
...(formData.maxTokens && { maxTokens: parseInt(formData.maxTokens) }),
...(formData.temperature && { temperature: parseFloat(formData.temperature) }),
...(formData.reasoningEffort !== 'default' && { reasoningEffort: formData.reasoningEffort }),
...(formData.fallbackModel !== 'default' && { fallbackModel: formData.fallbackModel }),
Expand Down Expand Up @@ -289,19 +286,31 @@ export function ConfigModal({
<Settings className="h-5 w-5" />
Configure {agentConfig.name}
</DialogTitle>
<DialogDescription className="space-y-2">
<p>{agentConfig.description}</p>
{getModelRecommendation(agentConfig.key) && (
<Alert>
<Info className="h-4 w-4" />
<AlertDescription className="text-sm">
{getModelRecommendation(agentConfig.key)}
</AlertDescription>
</Alert>
)}
<DialogDescription>
{agentConfig.description}
</DialogDescription>
</DialogHeader>

{/* Alerts outside DialogDescription to avoid nested p/div issues */}
<div className="space-y-2 -mt-2">
{agentConfig.constraint?.enabled && (
<Alert>
<Info className="h-4 w-4" />
<AlertDescription className="text-sm">
Model selection limited to {agentConfig.constraint.allowedModels.length} allowed model{agentConfig.constraint.allowedModels.length !== 1 ? 's' : ''} for this operation.
</AlertDescription>
</Alert>
)}
{getModelRecommendation(agentConfig.key) && (
<Alert>
<Info className="h-4 w-4" />
<AlertDescription className="text-sm">
{getModelRecommendation(agentConfig.key)}
</AlertDescription>
</Alert>
)}
</div>

<div className="space-y-6">
{/* Current Status */}
<div className="flex items-center justify-between p-3 bg-bg-3/50 rounded-lg">
Expand Down Expand Up @@ -428,7 +437,7 @@ export function ConfigModal({
<div className="space-y-4">
<h4 className="font-medium text-sm">Parameters</h4>

<div className="grid grid-cols-1 md:grid-cols-3 gap-4">
<div className="grid grid-cols-1 md:grid-cols-2 gap-4">
{/* Temperature */}
<div className="space-y-2">
<Label className="text-sm font-medium">Temperature</Label>
Expand All @@ -449,25 +458,6 @@ export function ConfigModal({
)}
</div>

{/* Max Tokens */}
<div className="space-y-2">
<Label className="text-sm font-medium">Max Tokens</Label>
<Input
type="number"
min="1"
max="200000"
value={formData.maxTokens}
placeholder={defaultConfig?.max_tokens ? `${defaultConfig.max_tokens}` : '4000'}
onChange={(e) => setFormData({...formData, maxTokens: e.target.value})}
className="h-10"
/>
{defaultConfig?.max_tokens && (
<p className="text-xs text-text-tertiary">
🔧 Default: {defaultConfig.max_tokens?.toLocaleString()}
</p>
)}
</div>

{/* Reasoning Effort */}
<div className="space-y-2">
<Label className="text-sm font-medium">Reasoning Effort</Label>
Expand Down
Loading
Loading