rrce-workflow 0.2.58 → 0.2.60
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.
- package/dist/index.js +38 -5
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -49,6 +49,27 @@ function getConfigPath(workspaceRoot) {
|
|
|
49
49
|
if (fs.existsSync(legacyPath)) {
|
|
50
50
|
return legacyPath;
|
|
51
51
|
}
|
|
52
|
+
try {
|
|
53
|
+
const rrceHome = getDefaultRRCEHome();
|
|
54
|
+
const mcpConfigPath = path.join(rrceHome, "mcp.yaml");
|
|
55
|
+
if (fs.existsSync(mcpConfigPath)) {
|
|
56
|
+
const mcpContent = fs.readFileSync(mcpConfigPath, "utf-8");
|
|
57
|
+
const lines = mcpContent.split("\n");
|
|
58
|
+
let currentName = "";
|
|
59
|
+
for (let i = 0; i < lines.length; i++) {
|
|
60
|
+
const line = lines[i].trim();
|
|
61
|
+
if (line.startsWith("- name:")) {
|
|
62
|
+
currentName = line.replace("- name:", "").trim();
|
|
63
|
+
} else if (line.startsWith("path:")) {
|
|
64
|
+
const p = line.replace("path:", "").trim();
|
|
65
|
+
if (p === workspaceRoot || p === `"${workspaceRoot}"` || p === `'${workspaceRoot}'`) {
|
|
66
|
+
return path.join(rrceHome, "workspaces", currentName, "config.yaml");
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
} catch (e) {
|
|
72
|
+
}
|
|
52
73
|
return newPath;
|
|
53
74
|
}
|
|
54
75
|
function getWorkspaceName(workspaceRoot) {
|
|
@@ -1168,7 +1189,13 @@ function installAgentPrompts(config, workspacePath, dataPaths) {
|
|
|
1168
1189
|
}
|
|
1169
1190
|
}
|
|
1170
1191
|
function createWorkspaceConfig(config, workspacePath, workspaceName) {
|
|
1171
|
-
|
|
1192
|
+
let configPath;
|
|
1193
|
+
if (config.storageMode === "global") {
|
|
1194
|
+
const rrceHome = config.globalPath || getDefaultRRCEHome();
|
|
1195
|
+
configPath = path10.join(rrceHome, "workspaces", workspaceName, "config.yaml");
|
|
1196
|
+
} else {
|
|
1197
|
+
configPath = path10.join(workspacePath, ".rrce-workflow", "config.yaml");
|
|
1198
|
+
}
|
|
1172
1199
|
ensureDir(path10.dirname(configPath));
|
|
1173
1200
|
let content = `# RRCE-Workflow Configuration
|
|
1174
1201
|
version: 1
|
|
@@ -2924,7 +2951,7 @@ var init_ProjectsView = __esm({
|
|
|
2924
2951
|
const [config, setConfig] = useState2(initialConfig);
|
|
2925
2952
|
const projectItems = allProjects.map((p) => {
|
|
2926
2953
|
const projectConfig = config.projects.find(
|
|
2927
|
-
(c) => c.path && c.path === p.path || !c.path && c.name === p.name
|
|
2954
|
+
(c) => c.path && c.path === p.path || p.source === "global" && c.name === p.name || !c.path && c.name === p.name
|
|
2928
2955
|
);
|
|
2929
2956
|
const isExposed = projectConfig ? projectConfig.expose : config.defaults.includeNew;
|
|
2930
2957
|
return {
|
|
@@ -2942,12 +2969,14 @@ var init_ProjectsView = __esm({
|
|
|
2942
2969
|
const isSelected = selectedIds.includes(item.value);
|
|
2943
2970
|
const project = allProjects.find((p) => p.dataPath === item.value);
|
|
2944
2971
|
if (project) {
|
|
2972
|
+
const existingConfig = newConfig.projects.find((p) => p.name === project.name);
|
|
2973
|
+
const projectPath = project.source === "global" && existingConfig?.path ? existingConfig.path : project.path;
|
|
2945
2974
|
newConfig = setProjectConfig(
|
|
2946
2975
|
newConfig,
|
|
2947
2976
|
project.name,
|
|
2948
2977
|
isSelected,
|
|
2949
2978
|
void 0,
|
|
2950
|
-
|
|
2979
|
+
projectPath
|
|
2951
2980
|
);
|
|
2952
2981
|
}
|
|
2953
2982
|
});
|
|
@@ -3161,7 +3190,10 @@ var init_IndexingStatus = __esm({
|
|
|
3161
3190
|
const fetchStats = async () => {
|
|
3162
3191
|
const newStats = [];
|
|
3163
3192
|
for (const project of projects) {
|
|
3164
|
-
|
|
3193
|
+
let projConfig = findProjectConfig(config, { name: project.name, path: project.path });
|
|
3194
|
+
if (!projConfig && project.source === "global") {
|
|
3195
|
+
projConfig = config.projects.find((p) => p.name === project.name);
|
|
3196
|
+
}
|
|
3165
3197
|
const enabled = projConfig?.semanticSearch?.enabled ?? false;
|
|
3166
3198
|
if (!enabled) {
|
|
3167
3199
|
newStats.push({
|
|
@@ -3852,7 +3884,8 @@ async function executeSetup(config, workspacePath, workspaceName, allProjects, s
|
|
|
3852
3884
|
const { updateGitignore: updateGitignore2 } = await Promise.resolve().then(() => (init_gitignore(), gitignore_exports));
|
|
3853
3885
|
updateGitignore2(workspacePath, config.storageMode, config.tools);
|
|
3854
3886
|
}
|
|
3855
|
-
|
|
3887
|
+
const needsVSCodeWorkspace = config.storageMode === "workspace" && config.tools.includes("copilot") || config.linkedProjects.length > 0;
|
|
3888
|
+
if (needsVSCodeWorkspace) {
|
|
3856
3889
|
const selectedProjects = allProjects.filter(
|
|
3857
3890
|
(p) => config.linkedProjects.includes(`${p.name}:${p.source}`)
|
|
3858
3891
|
);
|