@thxgg/steward 0.1.3 → 0.1.5

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.
@@ -6,7 +6,7 @@ import { Primitive } from "reka-ui"
6
6
  import { cn } from "@/lib/utils"
7
7
  import { buttonVariants } from "."
8
8
 
9
- interface Props extends PrimitiveProps {
9
+ type Props = PrimitiveProps & {
10
10
  variant?: ButtonVariants["variant"]
11
11
  size?: ButtonVariants["size"]
12
12
  class?: HTMLAttributes["class"]
@@ -128,9 +128,10 @@ export const prds = {
128
128
  if (!progress) {
129
129
  return [];
130
130
  }
131
- const taskLog = progress.taskLogs.find((log) => log.taskId === taskId);
131
+ const taskLogs = Array.isArray(progress.taskLogs) ? progress.taskLogs : [];
132
+ const taskLog = taskLogs.find((log) => log.taskId === taskId);
132
133
  if (!taskLog) {
133
- throw new Error(`Task "${taskId}" not found in progress state`);
134
+ return [];
134
135
  }
135
136
  if (!taskLog.commits || taskLog.commits.length === 0) {
136
137
  return [];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thxgg/steward",
3
- "version": "0.1.3",
3
+ "version": "0.1.5",
4
4
  "description": "Local-first PRD workflow steward with codemode MCP and web UI.",
5
5
  "type": "module",
6
6
  "author": "thxgg",
@@ -51,14 +51,14 @@ export default defineEventHandler(async (event) => {
51
51
  return []
52
52
  }
53
53
 
54
+ // Handle legacy progress files that may not have taskLogs
55
+ const taskLogs = Array.isArray(progress.taskLogs) ? progress.taskLogs : []
56
+
54
57
  // Find task log entry matching taskId
55
- const taskLog = progress.taskLogs.find(log => log.taskId === taskId)
58
+ const taskLog = taskLogs.find(log => log.taskId === taskId)
56
59
 
57
60
  if (!taskLog) {
58
- throw createError({
59
- statusCode: 404,
60
- statusMessage: `Task "${taskId}" not found in progress state`
61
- })
61
+ return []
62
62
  }
63
63
 
64
64
  // No commits recorded