create-claude-workspace 1.1.7 → 1.1.8
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.
|
@@ -153,16 +153,27 @@ function isProjectComplete(memory) {
|
|
|
153
153
|
lower.includes('## status\n\ncomplete');
|
|
154
154
|
}
|
|
155
155
|
|
|
156
|
+
function getMemoryField(memory, field) {
|
|
157
|
+
if (!memory) return null;
|
|
158
|
+
// Match "## Field\nvalue" or "**Field:** value" or "- Field: value"
|
|
159
|
+
const patterns = [
|
|
160
|
+
new RegExp(`## ${field}\\s*\\n+\\s*(.+)`),
|
|
161
|
+
new RegExp(`\\*\\*${field}:?\\*\\*:?\\s*(.+)`),
|
|
162
|
+
new RegExp(`-\\s*${field}:\\s*(.+)`),
|
|
163
|
+
];
|
|
164
|
+
for (const re of patterns) {
|
|
165
|
+
const m = memory.match(re);
|
|
166
|
+
if (m?.[1]?.trim()) return m[1].trim();
|
|
167
|
+
}
|
|
168
|
+
return null;
|
|
169
|
+
}
|
|
170
|
+
|
|
156
171
|
function getCurrentTask(memory) {
|
|
157
|
-
|
|
158
|
-
const match = memory.match(/## Current Task\n+(.+)/);
|
|
159
|
-
return match?.[1]?.trim() ?? 'unknown';
|
|
172
|
+
return getMemoryField(memory, 'Current Task') ?? 'unknown';
|
|
160
173
|
}
|
|
161
174
|
|
|
162
175
|
function getCurrentPhase(memory) {
|
|
163
|
-
|
|
164
|
-
const match = memory.match(/## Current Phase\n+(.+)/);
|
|
165
|
-
return match?.[1]?.trim() ?? 'unknown';
|
|
176
|
+
return getMemoryField(memory, 'Current Phase') ?? 'unknown';
|
|
166
177
|
}
|
|
167
178
|
|
|
168
179
|
let currentChild = null;
|