@workflow-code/cli 0.2.4-20261011009.codex-cli-web → 0.2.4-20261012001

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -75,6 +75,7 @@ try {
75
75
  listLocalWorkflowKVEntries, deleteLocalWorkflowKVEntry, getKnowledgeDocument, listKnowledgeDocuments,
76
76
  } = await import(coreUrl);
77
77
  const core = await import(coreUrl);
78
+ const language = /^zh/i.test(process.env[core.WORKFLOW_RUNTIME_LOCALE_ENV] ?? process.env.WORKFLOW_CODE_LOCALE ?? 'en') ? 'zh-CN' : 'en';
78
79
  const { readKanbanProjectInfo, runKanbanDataCall } = await import(new URL(import.meta.url.includes('/src/web/') ? './kanban-data.ts' : './kanban-data.mjs', import.meta.url));
79
80
  if (request.method === 'inspect') {
80
81
  const projects = [];
@@ -88,7 +89,7 @@ try {
88
89
  id: pkg.id,
89
90
  runtime: { coreVersion: coreManifest.version, corePath },
90
91
  folderPath,
91
- name: pkg.workflowCode?.projectInfo?.localizedNames?.['zh-CN'] ?? pkg.name ?? path.basename(folderPath),
92
+ name: pkg.workflowCode?.projectInfo?.localizedNames?.[language] ?? pkg.name ?? path.basename(folderPath),
92
93
  projectType: structure.projectType,
93
94
  ...parameters(structure),
94
95
  entrypoints: (structure.entrypoints ?? []).map((entry) => ({ id: entry.id, title: entry.title, group: entry.group, description: entry.description, execution: entry.execution, ...parameters(entry) })),
@@ -122,6 +123,13 @@ try {
122
123
  process.env.WORKFLOW_DEVELOPER_ASSISTANT_WORKSPACE_MANIFEST = manifestPath;
123
124
  }
124
125
  const storage = { host: 'local', local: { kvStoreDir: path.join(dataDir, 'kv'), persistentValueStoreDir: path.join(dataDir, 'values') } };
126
+ if (request.method === 'run' || request.method === 'resolve') {
127
+ const { createWebRelatedProjectRuntime } = await import(new URL(import.meta.url.includes('/src/web/') ? './related-projects.ts' : './related-projects.mjs', import.meta.url));
128
+ const related = createWebRelatedProjectRuntime(core, { projectDir, storageDir: request.storageDir,
129
+ relatedProjects: request.relatedProjects ?? [], runId: request.runId, conversationId: request.conversationId });
130
+ storage.local.relatedProjectResolver = related.localResolver;
131
+ storage.server = { relatedProjectResolver: related.serverResolver };
132
+ }
125
133
  const filesDir = path.join(dataDir, 'files');
126
134
  const createdFiles = [];
127
135
  const managed = createServerWorkflowFileStore({ rootDir: filesDir, workflowName: request.project.id, conversationId: request.conversationId });
@@ -206,14 +214,14 @@ try {
206
214
  const rootDir = request.kind === 'knowledge' ? path.join(dataDir, 'values') : path.join(dataDir, 'kv');
207
215
  const store = createLocalWorkflowKVStore({ rootDir, storageKind: request.kind === 'knowledge' ? 'persistent_value' : 'kv' });
208
216
  const context = request.kind === 'knowledge'
209
- ? createWorkflowPersistentValueContext({ store, projectId: request.project.id, conversationId: request.conversationId })
210
- : createWorkflowKVContext({ store, projectId: request.project.id, conversationId: request.conversationId });
217
+ ? createWorkflowPersistentValueContext({ store, projectId: request.project.id, conversationId: target.conversationId ?? request.conversationId })
218
+ : createWorkflowKVContext({ store, projectId: request.project.id, conversationId: target.conversationId ?? request.conversationId });
211
219
  if (request.kind === 'knowledge') {
212
220
  send('result', target.documentId ? await getKnowledgeDocument({ persistentValue: context }, target.documentId) : await listKnowledgeDocuments({ persistentValue: context }));
213
221
  } else if (target.key) {
214
222
  send('result', await (target.scope === 'conversation' ? context.conversation : context).getValue(target.key) ?? null);
215
223
  } else {
216
- send('result', await listLocalWorkflowKVEntries({ rootDir, storageKind: 'kv', projectId: request.project.id, scope: target.scope === 'conversation' ? 'conversation' : 'project', conversationId: target.scope === 'conversation' ? request.conversationId : undefined, pageSize: 100 }));
224
+ send('result', await listLocalWorkflowKVEntries({ rootDir, storageKind: 'kv', projectId: request.project.id, scope: target.scope === 'conversation' ? 'conversation' : 'project', conversationId: target.scope === 'conversation' ? target.conversationId ?? request.conversationId : undefined, pageSize: 100 }));
217
225
  }
218
226
  } else if (request.method === 'delete-conversation') {
219
227
  for (const [storageKind, rootDir] of [['kv', path.join(dataDir, 'kv')], ['persistent_value', path.join(dataDir, 'values')]]) {
@@ -1072,23 +1072,89 @@ main {
1072
1072
  margin-top: 12px;
1073
1073
  }
1074
1074
  .resource-card {
1075
- display: flex;
1076
- align-items: center;
1077
- gap: 8px;
1075
+ display: block;
1076
+ width: 100%;
1078
1077
  min-width: 0;
1079
- max-width: 100%;
1080
- min-height: 36px;
1081
- padding: 6px 10px;
1078
+ margin: 8px 0;
1082
1079
  border: 1px solid var(--border);
1083
1080
  border-radius: 6px;
1084
1081
  background: var(--vscode-editor-background);
1082
+ overflow: hidden;
1083
+ container-type: inline-size;
1084
+ }
1085
+ .resource-card-row {
1086
+ display: flex;
1087
+ align-items: center;
1088
+ gap: 4px;
1089
+ min-height: 44px;
1090
+ padding: 4px 8px;
1091
+ }
1092
+ .resource-target {
1093
+ display: flex;
1094
+ align-items: center;
1095
+ gap: 10px;
1096
+ flex: 1;
1097
+ min-width: 0;
1098
+ min-height: 36px;
1099
+ padding: 6px 4px;
1100
+ border: 0;
1101
+ background: transparent;
1085
1102
  text-align: left;
1086
1103
  }
1087
- .resource-card > span:not(.codicon) {
1104
+ .resource-target > .codicon {
1105
+ flex: none;
1106
+ color: var(--muted);
1107
+ }
1108
+ .resource-title {
1088
1109
  min-width: 0;
1089
- overflow: hidden;
1090
- text-overflow: ellipsis;
1091
- white-space: nowrap;
1110
+ white-space: normal;
1111
+ overflow-wrap: anywhere;
1112
+ line-height: 1.5;
1113
+ }
1114
+ .resource-card-row > .icon-button {
1115
+ flex: none;
1116
+ width: 28px;
1117
+ height: 28px;
1118
+ }
1119
+ @container (max-width: 280px) {
1120
+ .resource-card-row {
1121
+ flex-wrap: wrap;
1122
+ }
1123
+ .resource-target {
1124
+ flex-basis: 100%;
1125
+ }
1126
+ }
1127
+ .resource-inline {
1128
+ height: 360px;
1129
+ max-height: 70vh;
1130
+ min-height: 160px;
1131
+ border-top: 1px solid var(--border);
1132
+ overflow: auto;
1133
+ }
1134
+ .resource-inline[role] {
1135
+ padding: 12px;
1136
+ color: var(--muted);
1137
+ }
1138
+ .resource-inline[role=alert] {
1139
+ color: var(--vscode-errorForeground);
1140
+ }
1141
+ .resource-inline iframe {
1142
+ display: block;
1143
+ width: 100%;
1144
+ height: 100%;
1145
+ border: 0;
1146
+ }
1147
+ .resource-call-details {
1148
+ padding: 8px 12px;
1149
+ border-top: 1px solid var(--border);
1150
+ max-height: 320px;
1151
+ overflow: auto;
1152
+ }
1153
+ .resource-call-details pre {
1154
+ margin: 0;
1155
+ font-size: 11px;
1156
+ white-space: pre-wrap;
1157
+ overflow-wrap: anywhere;
1092
1158
  }
1093
1159
  .input-prompt {
1094
1160
  margin: 16px 0;