@prevalentware/opencode-goal-plugin 0.1.13 → 0.1.14

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/tui.tsx +3 -6
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prevalentware/opencode-goal-plugin",
3
- "version": "0.1.13",
3
+ "version": "0.1.14",
4
4
  "description": "Codex-style long-running goal mode for OpenCode.",
5
5
  "keywords": [
6
6
  "opencode",
package/src/tui.tsx CHANGED
@@ -111,7 +111,7 @@ function sessionIDOrToast(api: TuiPluginApi) {
111
111
  return sessionID
112
112
  }
113
113
 
114
- function formatDuration(seconds: number) {
114
+ export function formatDuration(seconds: number) {
115
115
  const total = Math.max(0, Math.floor(seconds))
116
116
  const hours = Math.floor(total / 3600)
117
117
  const minutes = Math.floor((total % 3600) / 60)
@@ -202,7 +202,7 @@ function formatGoal(goal: GoalSnapshot | null) {
202
202
  const lines = [
203
203
  `Objective: ${goal.objective}`,
204
204
  `Status: ${visibleStatus(goal.status)}`,
205
- `Time used: ${goal.timeUsedSeconds}s`,
205
+ `Time used: ${formatDuration(goal.timeUsedSeconds)}`,
206
206
  ]
207
207
  if (goal.completionEvidence) lines.push(`Completion evidence: ${goal.completionEvidence}`)
208
208
  if (goal.blocker) lines.push(`Blocker: ${goal.blocker}`)
@@ -223,10 +223,7 @@ function GoalSidebar(props: { api: TuiPluginApi; sessionID: string }) {
223
223
  const value = goal()
224
224
  return value ? liveTimeUsedSeconds(value, nowSeconds()) : 0
225
225
  })
226
- const objective = createMemo(() => {
227
- const value = goal()?.objective ?? ""
228
- return value.length > 72 ? `${value.slice(0, 69)}...` : value
229
- })
226
+ const objective = createMemo(() => goal()?.objective ?? "")
230
227
 
231
228
  return (
232
229
  <Show when={goal()}>