openfox 2.0.112 → 2.0.114
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/CHANGELOG.md +49 -0
- package/README.md +1 -0
- package/dist/CHANGELOG.md +49 -0
- package/dist/agent-defaults/builder.agent.md +1 -0
- package/dist/agent-defaults/planner.agent.md +1 -0
- package/dist/{backend-P3GHHLHJ.js → backend-LVYHLGQJ.js} +2 -2
- package/dist/{chat-handler-BYXZIIV3.js → chat-handler-KWXRSWXZ.js} +32 -26
- package/dist/{chunk-XWNCKIPO.js → chunk-2XD65L7M.js} +2 -2
- package/dist/{chunk-C5NQF2K4.js → chunk-3O77NT4T.js} +29 -10
- package/dist/{chunk-XCK5IBO4.js → chunk-7GWARYQC.js} +60 -1042
- package/dist/{chunk-YHEQTVFV.js → chunk-AZHWLLPP.js} +1 -1
- package/dist/{chunk-FFPCVN5M.js → chunk-BZVW77PI.js} +4 -4
- package/dist/{chunk-SDGNV45R.js → chunk-FW4NDUBL.js} +15 -15
- package/dist/{chunk-Z56SEG4Z.js → chunk-GUHHUDNL.js} +6 -6
- package/dist/{chunk-RT2A2RRL.js → chunk-HP5CIB66.js} +2 -2
- package/dist/{chunk-UAF2FOI5.js → chunk-HV6IALXF.js} +7 -7
- package/dist/{chunk-SYJMUIRC.js → chunk-I7FY2LTR.js} +2 -2
- package/dist/{chunk-RISQXU32.js → chunk-JP7NM545.js} +2 -2
- package/dist/{chunk-NB2D6I64.js → chunk-JXLRL5JR.js} +5 -5
- package/dist/{chunk-RAKPI4OE.js → chunk-K733B5T2.js} +264 -27
- package/dist/{chunk-C372UH7N.js → chunk-KSXCOHHW.js} +18 -20
- package/dist/{chunk-JDT63SSP.js → chunk-L63Q4JQJ.js} +3 -3
- package/dist/{chunk-ERYUSG5C.js → chunk-LXYPMFTH.js} +3 -3
- package/dist/{chunk-FSYRANYR.js → chunk-MUSPWEBB.js} +4 -5
- package/dist/chunk-NCZRWCJN.js +7 -0
- package/dist/{chunk-JR54MDZI.js → chunk-NLO64UE3.js} +2 -2
- package/dist/{chunk-3UILDGOO.js → chunk-NWJLWLKF.js} +8 -8
- package/dist/chunk-OSXPQSLW.js +128 -0
- package/dist/chunk-OTYAEEX3.js +1081 -0
- package/dist/{chunk-PCC4DBPF.js → chunk-OXSTNSCF.js} +2 -2
- package/dist/{chunk-33Q7LCVD.js → chunk-P5UANBBX.js} +6 -4
- package/dist/{chunk-LCQ5AN6Y.js → chunk-PBW3YC3G.js} +89 -1
- package/dist/{chunk-IYTDCPEQ.js → chunk-QD7MRMCH.js} +352 -333
- package/dist/{chunk-N4RTAGFY.js → chunk-SA34STZ6.js} +2 -2
- package/dist/{chunk-FR5LUTLQ.js → chunk-SBSUDHL4.js} +10 -6
- package/dist/{chunk-6FPGJR7O.js → chunk-SFZGMB2G.js} +2 -2
- package/dist/{chunk-SVJFMZ2Q.js → chunk-TKKP56QK.js} +11 -4
- package/dist/{chunk-JNHKKUGJ.js → chunk-UPBWEHIL.js} +30 -148
- package/dist/{chunk-QGXLZZBS.js → chunk-UTIQ7OO5.js} +2 -2
- package/dist/{chunk-RKMP74BB.js → chunk-VPVLO436.js} +4 -4
- package/dist/chunk-W77NBJAZ.js +957 -0
- package/dist/{chunk-P45RJGOT.js → chunk-X25Q6RAV.js} +1 -1
- package/dist/{chunk-BOSKQI62.js → chunk-YGJIK3CG.js} +4 -4
- package/dist/cli/dev.js +1 -1
- package/dist/cli/index.js +1 -1
- package/dist/{client-QNQTX5EA.js → client-EM7ISGUP.js} +6 -6
- package/dist/{compactor-X2KZ3XFU.js → compactor-V3LR7APW.js} +13 -12
- package/dist/{config-TW5FHQEM.js → config-EAB3V4QK.js} +2 -2
- package/dist/{dynamic-context-ZRQO2FJN.js → dynamic-context-MVGOF5V2.js} +10 -9
- package/dist/{events-Y6XXQYFG.js → events-PI7IMPHT.js} +8 -7
- package/dist/{folding-Z4GNWRC3.js → folding-FO57K4JM.js} +6 -5
- package/dist/http-client-33EZ3BLR.js +11 -0
- package/dist/{inspect-proxy-N42Z5TOG.js → inspect-proxy-NHKQQ2CD.js} +4 -4
- package/dist/launch-L5ROVNI3.js +52 -0
- package/dist/{manager-HCMDFEQH.js → manager-66YAEO7K.js} +5 -5
- package/dist/{model-overrides-O3ZYKFP7.js → model-overrides-L53PZNZA.js} +4 -4
- package/dist/orchestrator-XK5K3RPL.js +63 -0
- package/dist/package.json +7 -6
- package/dist/{path-security-525YLND3.js → path-security-RSEI3YKB.js} +12 -11
- package/dist/{platform-MEQUWG6U.js → platform-WA4GK5BO.js} +4 -4
- package/dist/{processor-UN4H4V7F.js → processor-WDZSFBVO.js} +31 -25
- package/dist/{project-creator-BVA55HY6.js → project-creator-676WQXVI.js} +3 -3
- package/dist/{projects-PQXME5S4.js → projects-SSBWIYL4.js} +3 -3
- package/dist/{protocol-D6MISQyz.d.ts → protocol-BzHs024-.d.ts} +23 -3
- package/dist/{protocol-FTHAR2YL.js → protocol-RKSWKNXI.js} +3 -3
- package/dist/provider/index.d.ts +4 -4
- package/dist/{provider-3R4X62LW.js → provider-PLIWRBCF.js} +9 -9
- package/dist/{provider-manager-W5N4XRE5.js → provider-manager-2QSJTPWS.js} +7 -7
- package/dist/{registry-74KPZ5NV.js → registry-ZP4TN2IN.js} +5 -4
- package/dist/{serve-WHFUNQ6Z.js → serve-MZ3BCCWC.js} +36 -33
- package/dist/server/index.d.ts +8 -5
- package/dist/server/index.js +35 -32
- package/dist/server-EPXODFMB.js +55 -0
- package/dist/service-54PGIPDQ.js +25 -0
- package/dist/{session-overrides-XH6I3COP.js → session-overrides-LXN6W7SA.js} +7 -6
- package/dist/{sessions-D772YTWL.js → sessions-CHPVUG6H.js} +8 -5
- package/dist/{settings-KO6DSJLD.js → settings-NEBM3GQX.js} +3 -3
- package/dist/shared/index.d.ts +3 -3
- package/dist/shared/index.js +1 -1
- package/dist/skill-defaults/workflows/SKILL.md +517 -0
- package/dist/tasks-TJXG2V3U.js +217 -0
- package/dist/{tools-HTUTYMKI.js → tools-CIM26IFB.js} +31 -23
- package/dist/{types-BMEOlLT0.d.ts → types-CMtHpDWT.d.ts} +81 -1
- package/dist/{types-D0TgGL3t.d.ts → types-CbggXFvR.d.ts} +1 -1
- package/dist/{update-BRUFGGTW.js → update-UZBBO42X.js} +2 -2
- package/dist/web/assets/{index-nS1p0g8O.css → index-BmILAZrT.css} +1 -1
- package/dist/web/assets/index-rZHXkfMq.js +324 -0
- package/dist/web/index.html +2 -2
- package/dist/web/sw.js +1 -1
- package/dist/workflow-defaults/default.workflow.json +45 -5
- package/dist/{workspace-YDUQZ3HC.js → workspace-2XODU4YJ.js} +4 -4
- package/package.json +7 -6
- package/dist/chunk-P5AA7OYJ.js +0 -7
- package/dist/http-client-2GDKHZIG.js +0 -11
- package/dist/orchestrator-P5EUMC7E.js +0 -57
- package/dist/server-7MOOJR2N.js +0 -48
- package/dist/web/assets/index-Dukvfqm-.js +0 -323
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,54 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 2.0.114 - 2026-08-10
|
|
4
|
+
|
|
5
|
+
### Features
|
|
6
|
+
|
|
7
|
+
- **Project-scoped task board**
|
|
8
|
+
- Every idea, bug, or chore gets a home — a clean To Do / In Progress / Done board right inside your project, with search and drag-and-drop
|
|
9
|
+
- Run tasks in parallel or leave them queued — the next one starts automatically when a slot frees, and you get a nudge linking to its session
|
|
10
|
+
- One click turns a card into a focused working session — the agent already knows the task and what's expected
|
|
11
|
+
- Define your own "definition of done" — a task needs the required evidence before it can move to Done
|
|
12
|
+
- Agents work the board just like you — picking up, working on, and completing tasks, with every move visible and reversible
|
|
13
|
+
- A fresh chat offers your next open task — start it with one click from the empty feed
|
|
14
|
+
- Creating a task feels like chatting — same composer, slash commands, attachments, and agent/model selection
|
|
15
|
+
|
|
16
|
+
### Enhancements
|
|
17
|
+
|
|
18
|
+
- **Workflow sub-group slices can escape** — tagged transitions let a slice loop across groups (verify → build → verify → done) while untagged edges stay clamped
|
|
19
|
+
|
|
20
|
+
### Bug Fixes
|
|
21
|
+
|
|
22
|
+
- **Wheel-up scrolling reliably stops auto-scroll** — scrolling up while streaming detaches the feed; deliberate scrolls down still re-attach
|
|
23
|
+
- **Dev-server inspect proxy survives high ports** — the port scan is clamped below 65536 so proxies above port 64535 start cleanly
|
|
24
|
+
|
|
25
|
+
## 2.0.113 - 2026-08-07
|
|
26
|
+
|
|
27
|
+
### Features
|
|
28
|
+
|
|
29
|
+
- **⚠️ Heads-up: Build & Verify now asks where to work** — the workflow prompts for a workspace before running and can auto-create one, replacing the previous silent default
|
|
30
|
+
- **Pin favorite sessions to the top** — star any session to keep it at the top of the sidebar and session picker
|
|
31
|
+
- **Sidebars are resizable** — drag to resize the session and project rails; widths reset on page refresh
|
|
32
|
+
- **Built-in workflow authoring skill** — agents can load the canonical spec to write compliant workflows
|
|
33
|
+
|
|
34
|
+
### Enhancements
|
|
35
|
+
|
|
36
|
+
- **Editable attachments when editing a message** — attachments show with remove buttons and persist on resend
|
|
37
|
+
- **Launch command pinned in the log viewer** — background processes show their start command and cwd at the top
|
|
38
|
+
|
|
39
|
+
### Bug Fixes
|
|
40
|
+
|
|
41
|
+
- **Same-name workflows can coexist** — built-in, global, and project workflows share IDs without colliding, each tagged and separately editable
|
|
42
|
+
- **Native context menu over links** — right-clicking a link opens the browser menu instead of the custom one
|
|
43
|
+
- **Auto-scroll rearmed after replay** — replaying or edit-resending a message resumes live scrolling on streamed output
|
|
44
|
+
- **No stray empty workspace.json** — unrelated settings saves no longer drop an empty config file into `.openfox/`
|
|
45
|
+
- **Inputs behave on touch devices** — fields no longer steal focus and pop the soft keyboard on phones and tablets
|
|
46
|
+
- **OpenCode Go model catalog fixed** — models now load from the correct `/zen/go/v1` endpoint
|
|
47
|
+
- **Windows paths and root checks fixed** — backslash workspace paths are detected again, bare drive roots are rejected, casing changes no longer warn falsely, and the root save flag can't get stuck
|
|
48
|
+
- **Token budget counts output accurately** — context-size tracking includes prompt plus completion, preventing spurious context-length errors
|
|
49
|
+
- **Unknown slash commands sent as text** — a `/`-input that isn't a command sends as a normal message instead of vanishing
|
|
50
|
+
- **Slash commands honor their agent mode** — launching a command now applies the agent mode configured for it
|
|
51
|
+
|
|
3
52
|
## 2.0.112 - 2026-08-03
|
|
4
53
|
|
|
5
54
|
### Bug Fixes
|
package/README.md
CHANGED
|
@@ -77,6 +77,7 @@ openfox provider remove # Remove provider
|
|
|
77
77
|
|
|
78
78
|
- **Plan → Builder Workflow**: Interactive task breakdown followed by autonomous implementation
|
|
79
79
|
- **Contract-Driven Execution**: Acceptance criteria serve as immutable contract
|
|
80
|
+
- **Workflows**: Declarative multi-step pipelines (agent turns, sub-agents, shell commands, user gates) with conditional transitions. File format and authoring reference: [docs/WORKFLOWS.md](docs/WORKFLOWS.md)
|
|
80
81
|
- **Iterative Verification**: Agent loops until all criteria pass
|
|
81
82
|
- **LSP Integration**: Immediate feedback on code validity
|
|
82
83
|
- **Real-Time Metrics**: Prefill time, generation speed, context usage
|
package/dist/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,54 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 2.0.114 - 2026-08-10
|
|
4
|
+
|
|
5
|
+
### Features
|
|
6
|
+
|
|
7
|
+
- **Project-scoped task board**
|
|
8
|
+
- Every idea, bug, or chore gets a home — a clean To Do / In Progress / Done board right inside your project, with search and drag-and-drop
|
|
9
|
+
- Run tasks in parallel or leave them queued — the next one starts automatically when a slot frees, and you get a nudge linking to its session
|
|
10
|
+
- One click turns a card into a focused working session — the agent already knows the task and what's expected
|
|
11
|
+
- Define your own "definition of done" — a task needs the required evidence before it can move to Done
|
|
12
|
+
- Agents work the board just like you — picking up, working on, and completing tasks, with every move visible and reversible
|
|
13
|
+
- A fresh chat offers your next open task — start it with one click from the empty feed
|
|
14
|
+
- Creating a task feels like chatting — same composer, slash commands, attachments, and agent/model selection
|
|
15
|
+
|
|
16
|
+
### Enhancements
|
|
17
|
+
|
|
18
|
+
- **Workflow sub-group slices can escape** — tagged transitions let a slice loop across groups (verify → build → verify → done) while untagged edges stay clamped
|
|
19
|
+
|
|
20
|
+
### Bug Fixes
|
|
21
|
+
|
|
22
|
+
- **Wheel-up scrolling reliably stops auto-scroll** — scrolling up while streaming detaches the feed; deliberate scrolls down still re-attach
|
|
23
|
+
- **Dev-server inspect proxy survives high ports** — the port scan is clamped below 65536 so proxies above port 64535 start cleanly
|
|
24
|
+
|
|
25
|
+
## 2.0.113 - 2026-08-07
|
|
26
|
+
|
|
27
|
+
### Features
|
|
28
|
+
|
|
29
|
+
- **⚠️ Heads-up: Build & Verify now asks where to work** — the workflow prompts for a workspace before running and can auto-create one, replacing the previous silent default
|
|
30
|
+
- **Pin favorite sessions to the top** — star any session to keep it at the top of the sidebar and session picker
|
|
31
|
+
- **Sidebars are resizable** — drag to resize the session and project rails; widths reset on page refresh
|
|
32
|
+
- **Built-in workflow authoring skill** — agents can load the canonical spec to write compliant workflows
|
|
33
|
+
|
|
34
|
+
### Enhancements
|
|
35
|
+
|
|
36
|
+
- **Editable attachments when editing a message** — attachments show with remove buttons and persist on resend
|
|
37
|
+
- **Launch command pinned in the log viewer** — background processes show their start command and cwd at the top
|
|
38
|
+
|
|
39
|
+
### Bug Fixes
|
|
40
|
+
|
|
41
|
+
- **Same-name workflows can coexist** — built-in, global, and project workflows share IDs without colliding, each tagged and separately editable
|
|
42
|
+
- **Native context menu over links** — right-clicking a link opens the browser menu instead of the custom one
|
|
43
|
+
- **Auto-scroll rearmed after replay** — replaying or edit-resending a message resumes live scrolling on streamed output
|
|
44
|
+
- **No stray empty workspace.json** — unrelated settings saves no longer drop an empty config file into `.openfox/`
|
|
45
|
+
- **Inputs behave on touch devices** — fields no longer steal focus and pop the soft keyboard on phones and tablets
|
|
46
|
+
- **OpenCode Go model catalog fixed** — models now load from the correct `/zen/go/v1` endpoint
|
|
47
|
+
- **Windows paths and root checks fixed** — backslash workspace paths are detected again, bare drive roots are rejected, casing changes no longer warn falsely, and the root save flag can't get stuck
|
|
48
|
+
- **Token budget counts output accurately** — context-size tracking includes prompt plus completion, preventing spurious context-length errors
|
|
49
|
+
- **Unknown slash commands sent as text** — a `/`-input that isn't a command sends as a normal message instead of vanishing
|
|
50
|
+
- **Slash commands honor their agent mode** — launching a command now applies the agent mode configured for it
|
|
51
|
+
|
|
3
52
|
## 2.0.112 - 2026-08-03
|
|
4
53
|
|
|
5
54
|
### Bug Fixes
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getBackendCapabilities,
|
|
3
3
|
getBackendDisplayName
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-AZHWLLPP.js";
|
|
5
5
|
import "./chunk-5WRI5ZAA.js";
|
|
6
6
|
export {
|
|
7
7
|
getBackendCapabilities,
|
|
8
8
|
getBackendDisplayName
|
|
9
9
|
};
|
|
10
|
-
//# sourceMappingURL=backend-
|
|
10
|
+
//# sourceMappingURL=backend-LVYHLGQJ.js.map
|
|
@@ -2,49 +2,55 @@ import {
|
|
|
2
2
|
buildRunChatTurnParams,
|
|
3
3
|
finalizeTurnCompletion,
|
|
4
4
|
generateSessionNameForSession
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-NWJLWLKF.js";
|
|
6
6
|
import {
|
|
7
7
|
runChatTurn
|
|
8
|
-
} from "./chunk-
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
14
|
-
import "./chunk-
|
|
15
|
-
import "./chunk-
|
|
8
|
+
} from "./chunk-FW4NDUBL.js";
|
|
9
|
+
import "./chunk-K733B5T2.js";
|
|
10
|
+
import "./chunk-GUHHUDNL.js";
|
|
11
|
+
import "./chunk-YGJIK3CG.js";
|
|
12
|
+
import "./chunk-NLO64UE3.js";
|
|
13
|
+
import "./chunk-2XD65L7M.js";
|
|
14
|
+
import "./chunk-P5UANBBX.js";
|
|
15
|
+
import "./chunk-TKKP56QK.js";
|
|
16
16
|
import "./chunk-I72ACQ6R.js";
|
|
17
17
|
import "./chunk-JE7LW7Y6.js";
|
|
18
18
|
import "./chunk-OAN4BXEW.js";
|
|
19
|
-
import "./chunk-
|
|
19
|
+
import "./chunk-SBSUDHL4.js";
|
|
20
20
|
import "./chunk-J7GAZGZT.js";
|
|
21
|
-
import "./chunk-
|
|
22
|
-
import "./chunk-
|
|
21
|
+
import "./chunk-OTYAEEX3.js";
|
|
22
|
+
import "./chunk-L63Q4JQJ.js";
|
|
23
|
+
import "./chunk-BZVW77PI.js";
|
|
23
24
|
import {
|
|
24
25
|
getEventStore
|
|
25
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-JXLRL5JR.js";
|
|
26
27
|
import {
|
|
27
28
|
createChatMessageMessage,
|
|
28
29
|
createPhaseChangedMessage,
|
|
29
30
|
createSessionRunningMessage
|
|
30
|
-
} from "./chunk-
|
|
31
|
-
import "./chunk-
|
|
31
|
+
} from "./chunk-I7FY2LTR.js";
|
|
32
|
+
import "./chunk-SA34STZ6.js";
|
|
32
33
|
import "./chunk-JURM3RPZ.js";
|
|
33
|
-
import "./chunk-
|
|
34
|
-
import "./chunk-
|
|
35
|
-
import "./chunk-
|
|
34
|
+
import "./chunk-JP7NM545.js";
|
|
35
|
+
import "./chunk-SFZGMB2G.js";
|
|
36
|
+
import "./chunk-UTIQ7OO5.js";
|
|
36
37
|
import "./chunk-LCLH6ZUL.js";
|
|
37
|
-
import "./chunk-
|
|
38
|
-
import "./chunk-
|
|
38
|
+
import "./chunk-3O77NT4T.js";
|
|
39
|
+
import "./chunk-UPBWEHIL.js";
|
|
40
|
+
import "./chunk-OSXPQSLW.js";
|
|
41
|
+
import "./chunk-MUSPWEBB.js";
|
|
39
42
|
import "./chunk-J2GP3J3X.js";
|
|
43
|
+
import "./chunk-LXYPMFTH.js";
|
|
40
44
|
import "./chunk-V4IE7HJY.js";
|
|
41
|
-
import "./chunk-
|
|
45
|
+
import "./chunk-AZHWLLPP.js";
|
|
46
|
+
import "./chunk-HNCM3D7Y.js";
|
|
42
47
|
import "./chunk-L737Y63F.js";
|
|
43
|
-
import "./chunk-
|
|
44
|
-
import "./chunk-
|
|
48
|
+
import "./chunk-OXSTNSCF.js";
|
|
49
|
+
import "./chunk-HP5CIB66.js";
|
|
50
|
+
import "./chunk-PBW3YC3G.js";
|
|
45
51
|
import "./chunk-K44MW7JJ.js";
|
|
46
|
-
import "./chunk-
|
|
47
|
-
import "./chunk-
|
|
52
|
+
import "./chunk-X25Q6RAV.js";
|
|
53
|
+
import "./chunk-KSXCOHHW.js";
|
|
48
54
|
import "./chunk-CQGTEGKL.js";
|
|
49
55
|
import "./chunk-5WRI5ZAA.js";
|
|
50
56
|
|
|
@@ -167,4 +173,4 @@ export {
|
|
|
167
173
|
startChatSession,
|
|
168
174
|
stopSessionExecution
|
|
169
175
|
};
|
|
170
|
-
//# sourceMappingURL=chat-handler-
|
|
176
|
+
//# sourceMappingURL=chat-handler-KWXRSWXZ.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getPlatformShell
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-SA34STZ6.js";
|
|
4
4
|
|
|
5
5
|
// src/server/tools/tool-policy.ts
|
|
6
6
|
var ALWAYS_ALLOWED = /* @__PURE__ */ new Set(["step_done"]);
|
|
@@ -246,4 +246,4 @@ export {
|
|
|
246
246
|
buildAgentSmallReminder,
|
|
247
247
|
COMPACTION_PROMPT
|
|
248
248
|
};
|
|
249
|
-
//# sourceMappingURL=chunk-
|
|
249
|
+
//# sourceMappingURL=chunk-2XD65L7M.js.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
resolveDefaultAgentId
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-UPBWEHIL.js";
|
|
4
4
|
import {
|
|
5
5
|
getDatabase
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-PBW3YC3G.js";
|
|
7
7
|
|
|
8
8
|
// src/server/db/sessions.ts
|
|
9
9
|
function getProjectDangerLevel(projectId) {
|
|
@@ -232,6 +232,7 @@ function listSessions() {
|
|
|
232
232
|
s.mode,
|
|
233
233
|
s.workflow_phase,
|
|
234
234
|
s.is_running,
|
|
235
|
+
s.is_favorite,
|
|
235
236
|
s.created_at,
|
|
236
237
|
s.updated_at,
|
|
237
238
|
s.title,
|
|
@@ -239,7 +240,7 @@ function listSessions() {
|
|
|
239
240
|
s.provider_model,
|
|
240
241
|
s.message_count
|
|
241
242
|
FROM sessions s
|
|
242
|
-
ORDER BY s.updated_at DESC
|
|
243
|
+
ORDER BY s.is_favorite DESC, s.updated_at DESC
|
|
243
244
|
`
|
|
244
245
|
).all();
|
|
245
246
|
return rows.map(mapSessionSummaryRow);
|
|
@@ -264,6 +265,7 @@ function listSessionsPaged(projectId, limit, offset) {
|
|
|
264
265
|
s.mode,
|
|
265
266
|
s.workflow_phase,
|
|
266
267
|
s.is_running,
|
|
268
|
+
s.is_favorite,
|
|
267
269
|
s.created_at,
|
|
268
270
|
s.updated_at,
|
|
269
271
|
s.title,
|
|
@@ -272,7 +274,7 @@ function listSessionsPaged(projectId, limit, offset) {
|
|
|
272
274
|
s.message_count
|
|
273
275
|
FROM sessions s
|
|
274
276
|
${where}
|
|
275
|
-
ORDER BY s.updated_at DESC
|
|
277
|
+
ORDER BY s.is_favorite DESC, s.updated_at DESC
|
|
276
278
|
LIMIT ? OFFSET ?
|
|
277
279
|
`
|
|
278
280
|
).all(...projectId ? [projectId] : [], limit + 1, offset);
|
|
@@ -293,6 +295,7 @@ function listHomeSessions(sessionsPerProject = 5) {
|
|
|
293
295
|
s.mode,
|
|
294
296
|
s.workflow_phase,
|
|
295
297
|
s.is_running,
|
|
298
|
+
s.is_favorite,
|
|
296
299
|
s.created_at,
|
|
297
300
|
s.updated_at,
|
|
298
301
|
s.title,
|
|
@@ -351,16 +354,31 @@ function mapSessionSummaryRow(row) {
|
|
|
351
354
|
...row.title ? { title: row.title } : {},
|
|
352
355
|
criteriaCount: 0,
|
|
353
356
|
criteriaCompleted: 0,
|
|
354
|
-
messageCount: row.message_count
|
|
357
|
+
messageCount: row.message_count,
|
|
358
|
+
isFavorite: Boolean(row.is_favorite)
|
|
355
359
|
};
|
|
356
360
|
}
|
|
357
|
-
function
|
|
361
|
+
function toggleFavorite(id, isFavorite) {
|
|
362
|
+
const db = getDatabase();
|
|
363
|
+
db.prepare(`UPDATE sessions SET is_favorite = ? WHERE id = ?`).run(isFavorite ? 1 : 0, id);
|
|
364
|
+
}
|
|
365
|
+
function createWorkflowExecution(id, sessionId, workflowId, workflowName, workflowColor, params, subGroup) {
|
|
358
366
|
const db = getDatabase();
|
|
359
367
|
const now = Date.now();
|
|
360
368
|
db.prepare(
|
|
361
|
-
`INSERT INTO workflow_executions (id, session_id, workflow_id, workflow_name, workflow_color, status, step_output, params, created_at, updated_at)
|
|
362
|
-
VALUES (?, ?, ?, ?, ?, 'running', '{}', ?, ?, ?)`
|
|
363
|
-
).run(
|
|
369
|
+
`INSERT INTO workflow_executions (id, session_id, workflow_id, workflow_name, workflow_color, status, step_output, params, sub_group, created_at, updated_at)
|
|
370
|
+
VALUES (?, ?, ?, ?, ?, 'running', '{}', ?, ?, ?, ?)`
|
|
371
|
+
).run(
|
|
372
|
+
id,
|
|
373
|
+
sessionId,
|
|
374
|
+
workflowId,
|
|
375
|
+
workflowName,
|
|
376
|
+
workflowColor ?? null,
|
|
377
|
+
JSON.stringify(params),
|
|
378
|
+
subGroup ?? null,
|
|
379
|
+
now,
|
|
380
|
+
now
|
|
381
|
+
);
|
|
364
382
|
}
|
|
365
383
|
function updateWorkflowExecutionStatus(executionId, status, stepId, stepName, stepOutput, pendingChoices) {
|
|
366
384
|
const db = getDatabase();
|
|
@@ -405,9 +423,10 @@ export {
|
|
|
405
423
|
updateSessionWorkdir,
|
|
406
424
|
updateSessionBranch,
|
|
407
425
|
deleteSession,
|
|
426
|
+
toggleFavorite,
|
|
408
427
|
createWorkflowExecution,
|
|
409
428
|
updateWorkflowExecutionStatus,
|
|
410
429
|
getActiveWorkflowExecution,
|
|
411
430
|
clearWorkflowExecution
|
|
412
431
|
};
|
|
413
|
-
//# sourceMappingURL=chunk-
|
|
432
|
+
//# sourceMappingURL=chunk-3O77NT4T.js.map
|