Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 40c97bd

Browse filesBrowse files
Merge pull request #701 from breaking-brake/main
Release: v3.32.0
2 parents 68d4f9c + d80ad4e commit 40c97bd
Copy full SHA for 40c97bd

29 files changed

+3,116-928Lines changed: 3116 additions & 928 deletions
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎.github/workflows/security-scan.yml‎

Copy file name to clipboardExpand all lines: .github/workflows/security-scan.yml
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ on:
55
branches: [main, production]
66
pull_request:
77
branches: [main, production]
8+
workflow_dispatch:
89
schedule:
910
# 毎週月曜日 9:00 JST (00:00 UTC) に実行
1011
- cron: '0 0 * * 1'
Collapse file

‎package-lock.json‎

Copy file name to clipboardExpand all lines: package-lock.json
+9-9Lines changed: 9 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Collapse file

‎resources/ai-editing-skill-template.md‎

Copy file name to clipboardExpand all lines: resources/ai-editing-skill-template.md
+5-2Lines changed: 5 additions & 2 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,16 @@
11
---
22
name: cc-workflow-ai-editor
3-
description: AI workflow editor for CC Workflow Studio. Create and edit visual AI agent workflows through interactive conversation using MCP tools (get_workflow_schema, get_current_workflow, apply_workflow). Use when the user wants to create a new workflow, modify an existing workflow, or edit the workflow canvas in CC Workflow Studio via the built-in MCP server.
3+
description: AI workflow editor for CC Workflow Studio. Create and edit visual AI agent workflows through interactive conversation using MCP tools (get_workflow_schema, get_current_workflow, apply_workflow, update_nodes). Use when the user wants to create a new workflow, modify an existing workflow, or edit the workflow canvas in CC Workflow Studio via the built-in MCP server.
44
---
55

66
1. Call `get_workflow_schema` via `cc-workflow-studio` MCP server
77
2. Call `get_current_workflow` via `cc-workflow-studio` MCP server
88
3. Ask the user what to create or modify
99
4. Generate workflow JSON: use built-in sub-agents (builtInType: explore/plan/general-purpose) by default. Only call `list_available_agents` when the user explicitly asks to use an existing custom sub-agent.
10-
5. Call `apply_workflow` via `cc-workflow-studio` MCP server, fix errors if any
10+
5. Apply changes via `cc-workflow-studio` MCP server:
11+
- **New workflow or structural changes** (add/remove nodes/connections): use `apply_workflow`
12+
- **Partial updates to existing nodes** (change name, position, or data): use `update_nodes` (more token-efficient)
13+
- Fix errors if any
1114
6. Ask for feedback, repeat from step 4
1215

1316
## Group Node
Collapse file

‎src/extension/commands/open-editor.ts‎

Copy file name to clipboardExpand all lines: src/extension/commands/open-editor.ts
+64Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
* Based on: /specs/001-cc-wf-studio/contracts/vscode-extension-api.md section 1.1
66
*/
77

8+
import * as crypto from 'node:crypto';
89
import * as vscode from 'vscode';
910
import type {
1011
AiEditingProvider,
@@ -25,6 +26,7 @@ import {
2526
startAntigravityTask,
2627
} from '../services/antigravity-extension-service';
2728
import { cancelGeneration } from '../services/claude-code-service';
29+
import { CommentarySessionManager } from '../services/commentary-session-manager';
2830
import { FileService } from '../services/file-service';
2931
import {
3032
getConfigTargetsForProvider,
@@ -105,6 +107,11 @@ let slackTokenManager: SlackTokenManager;
105107
let slackApiService: SlackApiService;
106108
let activeOAuthService: ReturnType<typeof createOAuthService> | null = null;
107109
let anthropicApiKeyManager: AnthropicApiKeyManager;
110+
let commentarySessionManager: CommentarySessionManager;
111+
let isCommentaryEnabled = false;
112+
let commentaryProvider: import('../../shared/types/messages').CommentaryProvider = 'claude-code';
113+
let commentaryCopilotModel: import('../../shared/types/messages').CopilotModel | undefined;
114+
let commentaryLanguage = 'English';
108115

109116
/**
110117
* Import parameters for workflow import from Slack
@@ -187,6 +194,9 @@ export function registerOpenEditorCommand(
187194
return;
188195
}
189196

197+
// Initialize Commentary Session Manager
198+
commentarySessionManager = new CommentarySessionManager();
199+
190200
// Create new webview panel
191201
currentPanel = vscode.window.createWebviewPanel(
192202
'ccWorkflowStudio',
@@ -426,12 +436,40 @@ export function registerOpenEditorCommand(
426436
// Non-fatal: continue with run even if MCP auto-start fails
427437
}
428438

439+
// Generate session ID for JSONL tracking (Commentary AI)
440+
const sessionId = isCommentaryEnabled ? crypto.randomUUID() : undefined;
441+
429442
// Run the slash command in terminal
430443
const result = executeSlashCommandInTerminal({
431444
workflowName: message.payload.workflow.name,
432445
workingDirectory: workspacePath,
446+
sessionId,
433447
});
434448

449+
// Start Commentary AI if enabled
450+
if (isCommentaryEnabled && sessionId) {
451+
const slashCommandPath = exportResult.exportedFiles?.find((f) =>
452+
f.replaceAll('\\', '/').includes('/commands/')
453+
);
454+
commentarySessionManager
455+
.startCommentary(
456+
sessionId,
457+
message.payload.workflow.name,
458+
workspacePath,
459+
webview,
460+
result.terminal,
461+
commentaryProvider,
462+
commentaryCopilotModel,
463+
commentaryLanguage,
464+
slashCommandPath
465+
)
466+
.catch((err) => {
467+
log('WARN', 'Failed to start commentary', {
468+
error: err instanceof Error ? err.message : String(err),
469+
});
470+
});
471+
}
472+
435473
// Send success response
436474
webview.postMessage({
437475
type: 'RUN_AS_SLASH_COMMAND_SUCCESS',
@@ -440,6 +478,7 @@ export function registerOpenEditorCommand(
440478
workflowName: message.payload.workflow.name,
441479
terminalName: result.terminalName,
442480
timestamp: new Date().toISOString(),
481+
sessionId,
443482
},
444483
});
445484
} catch (error) {
@@ -1998,6 +2037,28 @@ export function registerOpenEditorCommand(
19982037
break;
19992038
}
20002039

2040+
case 'TOGGLE_COMMENTARY': {
2041+
isCommentaryEnabled = message.payload?.enabled ?? false;
2042+
commentaryProvider = message.payload?.provider ?? 'claude-code';
2043+
commentaryCopilotModel = message.payload?.copilotModel;
2044+
commentaryLanguage = message.payload?.language ?? 'English';
2045+
log('INFO', 'Commentary AI toggled', {
2046+
enabled: isCommentaryEnabled,
2047+
provider: commentaryProvider,
2048+
copilotModel: commentaryCopilotModel,
2049+
language: commentaryLanguage,
2050+
});
2051+
if (!isCommentaryEnabled) {
2052+
commentarySessionManager?.stopCommentary();
2053+
}
2054+
break;
2055+
}
2056+
2057+
case 'STOP_COMMENTARY': {
2058+
commentarySessionManager?.stopCommentary();
2059+
break;
2060+
}
2061+
20012062
default:
20022063
console.warn('Unknown message type:', message);
20032064
}
@@ -2014,6 +2075,9 @@ export function registerOpenEditorCommand(
20142075
activeOAuthService.cancelPolling();
20152076
activeOAuthService = null;
20162077
}
2078+
// Stop Commentary AI session
2079+
commentarySessionManager?.dispose();
2080+
20172081
// Disconnect MCP server manager from webview
20182082
const disposeManager = getMcpServerManager();
20192083
if (disposeManager) {

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.