openpond 0.0.36 → 0.0.38
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/README.md +4 -3
- package/dist/api/types.d.ts +0 -50
- package/dist/api.d.ts +2 -8
- package/dist/chunks/{app-layer-4AA4YYGK.js → app-layer-DPUJRNO2.js} +6 -3
- package/dist/chunks/{apps-V2JTB5MD.js → apps-AKBI6AS7.js} +16 -132
- package/dist/chunks/chunk-275WCETC.js +668 -0
- package/dist/chunks/{chunk-3DOOLZZM.js → chunk-43YI36NA.js} +1 -1
- package/dist/chunks/{chunk-NWQTF6O4.js → chunk-AHNFNWUN.js} +28 -3
- package/dist/chunks/{chunk-3JJBNVNX.js → chunk-AHPQTEIJ.js} +23 -19
- package/dist/chunks/chunk-FWLOFUPU.js +864 -0
- package/dist/chunks/{chunk-JAS6QZ2W.js → chunk-GB6VUZUA.js} +1 -1
- package/dist/chunks/{chunk-NVTC3XOA.js → chunk-GDZYDLEL.js} +8 -10
- package/dist/chunks/{chunk-G6WW2656.js → chunk-HLCTINEP.js} +1 -1
- package/dist/chunks/{chunk-MJT7EW5Q.js → chunk-HS2AGRDV.js} +1 -1
- package/dist/chunks/{chunk-CJSD5ADV.js → chunk-JWF37O5E.js} +2 -2
- package/dist/chunks/chunk-KSRWKXRB.js +12 -0
- package/dist/chunks/{chunk-7IPF4X3K.js → chunk-LZZM3IHS.js} +1004 -89
- package/dist/chunks/{chunk-TYYR7KWY.js → chunk-MPGSHXGF.js} +7 -5
- package/dist/chunks/chunk-MUMPWI4O.js +92 -0
- package/dist/chunks/{chunk-MSX2J653.js → chunk-QRM7XMAO.js} +5 -36
- package/dist/chunks/{chunk-65BVQIHR.js → chunk-SLMP353Q.js} +6 -6
- package/dist/chunks/chunk-T4QXKU5Y.js +1 -0
- package/dist/chunks/{chunk-GALAW74P.js → chunk-V35STJF4.js} +30 -11
- package/dist/chunks/{chunk-YLULZMWE.js → chunk-XCATKTK3.js} +51 -139
- package/dist/chunks/{chunk-LHYK6QO2.js → chunk-XEJ7XXUQ.js} +1 -0
- package/dist/chunks/{chunk-YRFQKUZD.js → chunk-XERQHYBO.js} +89 -27
- package/dist/chunks/{chunk-6L5WJF7T.js → chunk-YTJL6XPU.js} +2 -2
- package/dist/chunks/{chunk-NWVIUBJ3.js → chunk-ZI4GDAUB.js} +573 -1217
- package/dist/chunks/cli-2KBVNDRY.js +23 -0
- package/dist/chunks/{cli-RJHEE4FA.js → cli-7BKDWFNU.js} +5 -5
- package/dist/chunks/{core-commands-CQSPCVC4.js → core-commands-YN4RMWA3.js} +7 -4
- package/dist/chunks/{extend-4MZ75SHV.js → extend-REGNTBK3.js} +18 -13
- package/dist/chunks/extension-7K77DAVL.js +121 -0
- package/dist/chunks/{harness-YVZU42S7.js → harness-BHQRMXJR.js} +6 -3
- package/dist/chunks/{help-6SULYXVS.js → help-VREQNA4I.js} +2 -1
- package/dist/chunks/{opchat-XGS4AXHA.js → opchat-D63YTNSX.js} +12 -7
- package/dist/chunks/{organizations-4GFQ3NT2.js → organizations-I46KG7TC.js} +8 -5
- package/dist/chunks/{profile-VWMBIHIE.js → profile-WKZJHEPG.js} +11 -8
- package/dist/chunks/{project-agent-SQ6ODALG.js → project-agent-ZUC3YMCT.js} +10 -7
- package/dist/chunks/{sandbox-command-34S2V7BN.js → sandbox-command-AAOPFTI5.js} +7 -4
- package/dist/chunks/{sandbox-template-VP5HMGQI.js → sandbox-template-GKNVR4C5.js} +11 -7
- package/dist/chunks/{src-X3R3XIJT.js → src-MWDIK56B.js} +1997 -1247
- package/dist/chunks/{src-YHUMH6W6.js → src-RPW5TOPI.js} +3 -3
- package/dist/chunks/{teams-bot-EIVRNO5S.js → teams-bot-PSL3ZO6Z.js} +6 -3
- package/dist/chunks/{workspaces-2N52V3BI.js → workspaces-BPXC2DHT.js} +6 -2
- package/dist/cli.js +14 -11
- package/dist/client-types.d.ts +1 -9
- package/dist/client.d.ts +3 -3
- package/dist/index.js +27 -55
- package/dist/profile/local-profile-types.d.ts +1 -0
- package/dist/profile/profile-skills.d.ts +2 -0
- package/dist/web/assets/{AppDialog-j4N-gIi3.js → AppDialog-DrwJb_wG.js} +1 -1
- package/dist/web/assets/{AppsView-YiK3pqNb.js → AppsView-DPagLMsc.js} +1 -1
- package/dist/web/assets/{BrowserSidebar-BWFLEQ8j.js → BrowserSidebar-DMn2V8RV.js} +1 -1
- package/dist/web/assets/{CloudWorkView-3sS_1bhN.js → CloudWorkView-Cl_7mM3c.js} +1 -1
- package/dist/web/assets/{CommandMenu-B11OrTCq.js → CommandMenu-CHMQLez_.js} +1 -1
- package/dist/web/assets/{CommunityView-DXyXTWhP.js → CommunityView-DcHVDUk0.js} +1 -1
- package/dist/web/assets/{ComposerCreateImproveStrip-3NoRiJJq.js → ComposerCreateImproveStrip-BZ3Dgzmo.js} +1 -1
- package/dist/web/assets/{GetStartedView-CPV5lgVH.js → GetStartedView-DTRotFqz.js} +1 -1
- package/dist/web/assets/LabSkillSidebar-CVxtS9pd.css +1 -0
- package/dist/web/assets/LabSkillSidebar-D-PqFe1T.js +1 -0
- package/dist/web/assets/LabsRoute-BrJkBNig.css +1 -0
- package/dist/web/assets/LabsRoute-Dew1BwK5.js +3 -0
- package/dist/web/assets/MainChatThread-BaPxxzrw.js +2 -0
- package/dist/web/assets/{MakeAgentTutorialLearningPanel-C6F-kJQd.js → MakeAgentTutorialLearningPanel-CBsfnONQ.js} +2 -2
- package/dist/web/assets/{MarkdownText-CkVkr3P1.js → MarkdownText-DGLfAM_Z.js} +4 -4
- package/dist/web/assets/Messages-CIX9uTjX.js +10 -0
- package/dist/web/assets/NativeSkillSidebar-AP_uHn6g.js +1 -0
- package/dist/web/assets/{NewProjectDialog-DBMhkTvD.js → NewProjectDialog-C6lHkafU.js} +1 -1
- package/dist/web/assets/{PostTrainingLearningPanel-B1Rp7iIL.js → PostTrainingLearningPanel-CZEgPc8O.js} +2 -2
- package/dist/web/assets/{PostTrainingStatusPill-BGZ9h5eW.js → PostTrainingStatusPill-CeEpwUDB.js} +1 -1
- package/dist/web/assets/{ProfileSettingsSection-2NOHEz2b.js → ProfileSettingsSection-EumMLlEp.js} +1 -1
- package/dist/web/assets/RightChatPanelStack-MXBcx3zO.js +1 -0
- package/dist/web/assets/{SettingsView-uHhQnazW.css → SettingsView-Caljbns2.css} +1 -1
- package/dist/web/assets/SettingsView-DyURG_Uh.js +6 -0
- package/dist/web/assets/{TeamChatView-qVscSedQ.js → TeamChatView-D3v6aqJ3.js} +1 -1
- package/dist/web/assets/{TerminalOverlay-Bkw7XqMy.js → TerminalOverlay-BKl0p8pa.js} +1 -1
- package/dist/web/assets/{TrainingCreationPanel-COg1wvw8.js → TrainingCreationPanel-CfZQTuT5.js} +1 -1
- package/dist/web/assets/{TrainingDraftPanel-BNK2znmI.js → TrainingDraftPanel-DslRPSDW.js} +1 -1
- package/dist/web/assets/{UsageSettingsSection-CUxBaohC.js → UsageSettingsSection-zDAwzTGl.js} +1 -1
- package/dist/web/assets/WorkspaceDiffPanel-C_MZPPlL.js +14 -0
- package/dist/web/assets/{WorkspaceEnvironmentMenu-C0-mH7oF.js → WorkspaceEnvironmentMenu-BUAnn80j.js} +1 -1
- package/dist/web/assets/{WorkspaceGitDialogs-VvC2px0X.js → WorkspaceGitDialogs-Drbf4ujA.js} +1 -1
- package/dist/web/assets/{WorkspaceMonacoEditor-CUIwoHv1.js → WorkspaceMonacoEditor-DPGcG8fy.js} +3 -3
- package/dist/web/assets/{activity-BhqHgkfJ.js → activity-Dnr3jqb3.js} +1 -1
- package/dist/web/assets/{boxes-BpqUKFIm.js → boxes-BinC8UPn.js} +1 -1
- package/dist/web/assets/{chevron-up-BTn9DVRP.js → chevron-up-Bjp_-_Cb.js} +1 -1
- package/dist/web/assets/{circle-x-B9Qa8o5a.js → circle-x-ubnvEYuE.js} +1 -1
- package/dist/web/assets/{copy-BsYs6wBI.js → copy-B_ZCCUMz.js} +1 -1
- package/dist/web/assets/{create-pipeline-request-vxgKoAvv.js → create-pipeline-request-D6uLUxe9.js} +3 -3
- package/dist/web/assets/{cssMode-mw8RI2fR.js → cssMode-CKN9CcfG.js} +1 -1
- package/dist/web/assets/file-8HAMlTmQ.js +1 -0
- package/dist/web/assets/{git-branch-C7qQYFIs.js → git-branch-l2Zih3Bv.js} +1 -1
- package/dist/web/assets/{git-commit-horizontal-CbX4pTOA.js → git-commit-horizontal-Bxi8YPep.js} +1 -1
- package/dist/web/assets/{htmlMode-Cc4Czh_M.js → htmlMode-CeUcNhBZ.js} +1 -1
- package/dist/web/assets/index-BMFyOFRU.css +1 -0
- package/dist/web/assets/index-BzwcDzbT.js +1 -0
- package/dist/web/assets/index-KoQSSt_f.js +177 -0
- package/dist/web/assets/{info-BNGbwgtq.js → info-JTbDQxHx.js} +1 -1
- package/dist/web/assets/{jsonMode-CbqbqGVz.js → jsonMode-97z0Yz9u.js} +1 -1
- package/dist/web/assets/{lspLanguageFeatures-DKiKr5tH.js → lspLanguageFeatures-D4Tp-JmI.js} +1 -1
- package/dist/web/assets/{make-agent-tutorial-KKauJpB9.js → make-agent-tutorial-D6nBCgv-.js} +1 -1
- package/dist/web/assets/{monaco.contribution-Dxc4IxFM.js → monaco.contribution-B3j6oown.js} +2 -2
- package/dist/web/assets/{monaco.contribution-CNgwz_pw.js → monaco.contribution-BXHxPPWL.js} +2 -2
- package/dist/web/assets/{monaco.contribution-D_-wu578.js → monaco.contribution-C2P5zIzh.js} +2 -2
- package/dist/web/assets/{monaco.contribution-CdUAX47Q.js → monaco.contribution-C8c6OtGi.js} +2 -2
- package/dist/web/assets/{monitor-CNdx_GTg.js → monitor-kzHtxHnA.js} +1 -1
- package/dist/web/assets/{play-BLRANWaV.js → play-C-37dnR1.js} +1 -1
- package/dist/web/assets/{python-DYgDMu2R.js → python-CGpDXY7_.js} +1 -1
- package/dist/web/assets/{refresh-cw-BFjjwYNf.js → refresh-cw-BAaaPCXl.js} +1 -1
- package/dist/web/assets/{reply-D012cuZl.js → reply-9rehU13k.js} +1 -1
- package/dist/web/assets/{rotate-cw-CTfjlR4G.js → rotate-cw-C1Z_Xs23.js} +1 -1
- package/dist/web/assets/{save-B1zYlRyN.js → save-Cvxs3XyC.js} +1 -1
- package/dist/web/assets/{toggleHighContrast-D9XFH7EA.js → toggleHighContrast-CD42jH4g.js} +1 -1
- package/dist/web/assets/{tsMode-BU-tuKsY.js → tsMode-ZROIxEjv.js} +1 -1
- package/dist/web/assets/{upload-DU_81jvL.js → upload-DvCSGERK.js} +1 -1
- package/dist/web/assets/{wifi-off-TPsBnbGW.js → wifi-off-BIb94PkS.js} +1 -1
- package/dist/web/assets/{workers-NhWySRdT.js → workers-oYqbrVYG.js} +1 -1
- package/dist/web/assets/{yaml-DWXa_3ZL.js → yaml-WqBjNgOO.js} +1 -1
- package/dist/web/index.html +2 -2
- package/docs/command-reference.md +16 -1
- package/package.json +1 -1
- package/dist/chunks/cli-4JA3SIDE.js +0 -19
- package/dist/web/assets/LabsRoute-B_nsEZXy.js +0 -3
- package/dist/web/assets/LabsRoute-dNN-odU0.css +0 -1
- package/dist/web/assets/MainChatThread-Dg7p3R2O.js +0 -2
- package/dist/web/assets/Messages-C7uHGoFw.js +0 -10
- package/dist/web/assets/NativeSkillSidebar-BPpoHjEW.js +0 -1
- package/dist/web/assets/RightChatPanelStack-CLK7_zKe.js +0 -1
- package/dist/web/assets/SettingsView-BAqea_KX.js +0 -6
- package/dist/web/assets/WorkspaceDiffPanel-qfFj8IRq.js +0 -14
- package/dist/web/assets/credit-card-BCePAwMI.js +0 -1
- package/dist/web/assets/index-9tbdqUau.css +0 -1
- package/dist/web/assets/index-B_3z_lxq.js +0 -1
- package/dist/web/assets/index-Cr_RZ7GD.js +0 -177
- package/dist/web/tokens/eth.svg +0 -1
- package/dist/web/tokens/usdc.svg +0 -1
|
@@ -3,7 +3,7 @@ import { createRequire as __openpondCreateRequire } from "node:module"; var requ
|
|
|
3
3
|
import {
|
|
4
4
|
createReadyLineParser,
|
|
5
5
|
openUrlWithSystemBrowser
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-QRM7XMAO.js";
|
|
7
7
|
import {
|
|
8
8
|
ApprovalSchema,
|
|
9
9
|
ContextUsageSnapshotSchema,
|
|
@@ -12,12 +12,12 @@ import {
|
|
|
12
12
|
DEFAULT_OPENPOND_CHAT_MODEL,
|
|
13
13
|
DEFAULT_OPENPOND_COMMAND_ACCESS_MODE,
|
|
14
14
|
OpenPondCommandAccessModeSchema
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-LZZM3IHS.js";
|
|
16
16
|
import {
|
|
17
17
|
CONNECTED_APP_CATALOG,
|
|
18
18
|
buildConnectedAppInstallUrl,
|
|
19
19
|
connectedAppById
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-XEJ7XXUQ.js";
|
|
21
21
|
import "./chunk-WYDVQOBL.js";
|
|
22
22
|
import "./chunk-UACZUFIA.js";
|
|
23
23
|
|
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
2
|
import {
|
|
3
3
|
resolveSandboxClient
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import "./chunk-
|
|
4
|
+
} from "./chunk-275WCETC.js";
|
|
5
|
+
import "./chunk-GDZYDLEL.js";
|
|
6
|
+
import "./chunk-XCATKTK3.js";
|
|
7
|
+
import "./chunk-ZI4GDAUB.js";
|
|
8
|
+
import "./chunk-KSRWKXRB.js";
|
|
6
9
|
import {
|
|
7
10
|
optionString,
|
|
8
11
|
parseJsonOption,
|
|
9
12
|
requiredTeamId
|
|
10
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-MUMPWI4O.js";
|
|
11
14
|
import "./chunk-UACZUFIA.js";
|
|
12
15
|
|
|
13
16
|
// src/cli/teams-bot.ts
|
|
@@ -27,6 +27,7 @@ import {
|
|
|
27
27
|
loadWorkspaceImageFileAtPath,
|
|
28
28
|
loadWorkspaceState,
|
|
29
29
|
loadWorkspaceStateAtPath,
|
|
30
|
+
localVideoContentType,
|
|
30
31
|
mapWorkspaceDiffEntriesWithConcurrency,
|
|
31
32
|
normalizeWorkspaceFilePath,
|
|
32
33
|
parseBranchStatusLine,
|
|
@@ -34,6 +35,7 @@ import {
|
|
|
34
35
|
parseStatusLine,
|
|
35
36
|
pathExists,
|
|
36
37
|
readLocalImageFile,
|
|
38
|
+
readLocalVideoFile,
|
|
37
39
|
readWorkspaceFile,
|
|
38
40
|
readWorkspaceImageFile,
|
|
39
41
|
redactRemoteUrl,
|
|
@@ -43,8 +45,8 @@ import {
|
|
|
43
45
|
truncatePatch,
|
|
44
46
|
uniqueSortedPaths,
|
|
45
47
|
workspaceImageContentType
|
|
46
|
-
} from "./chunk-
|
|
47
|
-
import "./chunk-
|
|
48
|
+
} from "./chunk-AHNFNWUN.js";
|
|
49
|
+
import "./chunk-HS2AGRDV.js";
|
|
48
50
|
import "./chunk-UACZUFIA.js";
|
|
49
51
|
export {
|
|
50
52
|
MACOS_GIT_MISSING_DEVELOPER_TOOLS_ERROR,
|
|
@@ -74,6 +76,7 @@ export {
|
|
|
74
76
|
loadWorkspaceImageFileAtPath,
|
|
75
77
|
loadWorkspaceState,
|
|
76
78
|
loadWorkspaceStateAtPath,
|
|
79
|
+
localVideoContentType,
|
|
77
80
|
mapWorkspaceDiffEntriesWithConcurrency,
|
|
78
81
|
normalizeWorkspaceFilePath,
|
|
79
82
|
parseBranchStatusLine,
|
|
@@ -81,6 +84,7 @@ export {
|
|
|
81
84
|
parseStatusLine,
|
|
82
85
|
pathExists,
|
|
83
86
|
readLocalImageFile,
|
|
87
|
+
readLocalVideoFile,
|
|
84
88
|
readWorkspaceFile,
|
|
85
89
|
readWorkspaceImageFile,
|
|
86
90
|
redactRemoteUrl,
|
package/dist/cli.js
CHANGED
|
@@ -4,12 +4,15 @@ import {
|
|
|
4
4
|
parseArgs,
|
|
5
5
|
resolveAccountOption,
|
|
6
6
|
resolveBaseUrlOption
|
|
7
|
-
} from "./chunks/chunk-
|
|
7
|
+
} from "./chunks/chunk-GDZYDLEL.js";
|
|
8
8
|
import {
|
|
9
9
|
getInstalledCliVersion,
|
|
10
|
-
parseBooleanOption,
|
|
11
10
|
runCliCommand
|
|
12
|
-
} from "./chunks/chunk-
|
|
11
|
+
} from "./chunks/chunk-XCATKTK3.js";
|
|
12
|
+
import "./chunks/chunk-KSRWKXRB.js";
|
|
13
|
+
import {
|
|
14
|
+
parseBooleanOption
|
|
15
|
+
} from "./chunks/chunk-MUMPWI4O.js";
|
|
13
16
|
import "./chunks/chunk-UACZUFIA.js";
|
|
14
17
|
|
|
15
18
|
// src/cli/top-level-action.ts
|
|
@@ -32,11 +35,11 @@ async function runOpenPondCli(argv = process.argv.slice(2)) {
|
|
|
32
35
|
return;
|
|
33
36
|
}
|
|
34
37
|
if (action === "check-update") {
|
|
35
|
-
await (await import("./chunks/core-commands-
|
|
38
|
+
await (await import("./chunks/core-commands-YN4RMWA3.js")).runCheckUpdate();
|
|
36
39
|
return;
|
|
37
40
|
}
|
|
38
41
|
if (action === "help") {
|
|
39
|
-
(await import("./chunks/help-
|
|
42
|
+
(await import("./chunks/help-VREQNA4I.js")).printHelp();
|
|
40
43
|
return;
|
|
41
44
|
}
|
|
42
45
|
const selectedAccount = resolveAccountOption(options);
|
|
@@ -48,31 +51,31 @@ async function runOpenPondCli(argv = process.argv.slice(2)) {
|
|
|
48
51
|
process.env.OPENPOND_BASE_URL = selectedBaseUrl;
|
|
49
52
|
}
|
|
50
53
|
if (action === "tui") {
|
|
51
|
-
await (await import("./chunks/app-layer-
|
|
54
|
+
await (await import("./chunks/app-layer-DPUJRNO2.js")).runOpenPondTerminalCommand(options, rest);
|
|
52
55
|
return;
|
|
53
56
|
}
|
|
54
57
|
if (action === "ui") {
|
|
55
|
-
await (await import("./chunks/app-layer-
|
|
58
|
+
await (await import("./chunks/app-layer-DPUJRNO2.js")).runOpenPondServerCommand("web", options, rest);
|
|
56
59
|
return;
|
|
57
60
|
}
|
|
58
61
|
if (await runCliCommand({ command, options, rest })) {
|
|
59
62
|
return;
|
|
60
63
|
}
|
|
61
|
-
(await import("./chunks/help-
|
|
64
|
+
(await import("./chunks/help-VREQNA4I.js")).printHelp();
|
|
62
65
|
process.exit(1);
|
|
63
66
|
}
|
|
64
67
|
async function runEmbeddedCompanion(argv) {
|
|
65
68
|
if (argv[0] === "__server") {
|
|
66
69
|
process.argv = [process.execPath, "openpond-server", ...argv.slice(1)];
|
|
67
70
|
const [{ createOpenPondServer }, { runOpenPondServerCli }] = await Promise.all([
|
|
68
|
-
import("./chunks/src-
|
|
69
|
-
import("./chunks/cli-
|
|
71
|
+
import("./chunks/src-MWDIK56B.js"),
|
|
72
|
+
import("./chunks/cli-7BKDWFNU.js")
|
|
70
73
|
]);
|
|
71
74
|
await runOpenPondServerCli(createOpenPondServer);
|
|
72
75
|
return true;
|
|
73
76
|
}
|
|
74
77
|
if (argv[0] === "__terminal") {
|
|
75
|
-
await (await import("./chunks/src-
|
|
78
|
+
await (await import("./chunks/src-RPW5TOPI.js")).runOpenPondTerminalCli(argv.slice(1));
|
|
76
79
|
return true;
|
|
77
80
|
}
|
|
78
81
|
return false;
|
package/dist/client-types.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { StreamCallbacks } from "./stream.js";
|
|
2
|
-
import type { AgentCreateRequest, AppEnvironmentGetResponse, AppEnvironmentUpdateResponse, AppExecutionTimelineResponse, AppListItem, AppRuntimeSummary, AppSchedulesResponse, AssistantMode, AssistantRunResponse, CreateRepoRequest, CreateRepoResponse, DeploymentLogEntry,
|
|
2
|
+
import type { AgentCreateRequest, AppEnvironmentGetResponse, AppEnvironmentUpdateResponse, AppExecutionTimelineResponse, AppListItem, AppRuntimeSummary, AppSchedulesResponse, AssistantMode, AssistantRunResponse, CreateRepoRequest, CreateRepoResponse, DeploymentLogEntry, OpenPondAccountResponse, OpenPondApiHealth, OpenToolRecipe, OpenToolRecipeGetRequest, OpenToolRecipeListRequest, OpenToolRecipeListResponse, OpenToolRecipeSearchRequest, OpenToolRecipeSearchResponse, OpenToolRulesGetRequest, OpenToolRulesGetResponse, PromotePreviewToProductionRequest, PromotePreviewToProductionResponse, ScheduleDeleteResponse, ScheduleExecutionLog, ScheduleExecutionLogsResponse, ScheduleRunNowRequest, ScheduleRunNowResponse, ScheduleToggleRequest, ScheduleToggleResult, StartAppLifecycleRequest, StartAppLifecycleResponse, TemplateBranchesResponse, TemplateDeployLatestRequest, TemplateDeployLatestResponse, TemplateStatusResponse, ToolExecuteRequest, ToolExecuteResponse } from "./api.js";
|
|
3
3
|
export type OpenPondClientOptions = {
|
|
4
4
|
apiKey?: string;
|
|
5
5
|
baseUrl?: string;
|
|
@@ -42,7 +42,6 @@ export type OpenPondClient = {
|
|
|
42
42
|
apiKey: string;
|
|
43
43
|
account: {
|
|
44
44
|
get: () => Promise<OpenPondAccountResponse>;
|
|
45
|
-
balance: () => Promise<OpenPondAccountBalanceResponse>;
|
|
46
45
|
health: () => Promise<OpenPondApiHealth>;
|
|
47
46
|
};
|
|
48
47
|
chat: {
|
|
@@ -98,7 +97,6 @@ export type OpenPondClient = {
|
|
|
98
97
|
promotePreview: (input: AppPromotePreviewOptions) => Promise<PromotePreviewToProductionResponse>;
|
|
99
98
|
envGet: (input: AppEnvironmentGetOptions) => Promise<AppEnvironmentGetResponse>;
|
|
100
99
|
envSet: (input: AppEnvironmentSetOptions) => Promise<AppEnvironmentUpdateResponse>;
|
|
101
|
-
positionsTx: (input?: PositionsTxOptions) => Promise<unknown>;
|
|
102
100
|
};
|
|
103
101
|
repo: {
|
|
104
102
|
create: (input: CreateRepoRequest & {
|
|
@@ -214,9 +212,3 @@ export type AppPromotePreviewOptions = {
|
|
|
214
212
|
export type AppStartOptions = {
|
|
215
213
|
appId: string;
|
|
216
214
|
} & StartAppLifecycleRequest;
|
|
217
|
-
export type PositionsTxOptions = {
|
|
218
|
-
method?: "GET" | "POST";
|
|
219
|
-
body?: unknown;
|
|
220
|
-
params?: Record<string, unknown>;
|
|
221
|
-
query?: Record<string, string>;
|
|
222
|
-
};
|
package/dist/client.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
export type { StreamCallbacks } from "./stream.js";
|
|
2
|
-
export type { AssistantMode, AssistantRunResponse, AgentCreateRequest, AppEnvironmentGetResponse, AppEnvironmentUpdateRequest, AppEnvironmentUpdateResponse, AppExecutionDeployment, AppExecutionTimelineResponse, AppExecutionToolRun, AppListItem, AppRuntimeSummary, AppSchedule, AppScheduleSummary, AppSchedulesResponse, CreateRepoRequest, CreateRepoResponse, DeploymentDetail, DeploymentLogEntry, OpenPondAccount,
|
|
2
|
+
export type { AssistantMode, AssistantRunResponse, AgentCreateRequest, AppEnvironmentGetResponse, AppEnvironmentUpdateRequest, AppEnvironmentUpdateResponse, AppExecutionDeployment, AppExecutionTimelineResponse, AppExecutionToolRun, AppListItem, AppRuntimeSummary, AppSchedule, AppScheduleSummary, AppSchedulesResponse, CreateRepoRequest, CreateRepoResponse, DeploymentDetail, DeploymentLogEntry, OpenPondAccount, OpenPondAccountProduct, OpenPondAccountResponse, OpenPondApiHealth, OpenPondApiHealthResponse, OpenToolRecipe, OpenToolRecipeDomain, OpenToolRecipeGetRequest, OpenToolRecipeListRequest, OpenToolRecipeListResponse, OpenToolRecipeSearchRequest, OpenToolRecipeSearchResponse, OpenToolRecipeSummary, OpenToolRulesGetRequest, OpenToolRulesGetResponse, PromotePreviewToProductionRequest, PromotePreviewToProductionResponse, ScheduleDeleteResponse, ScheduleExecutionLog, ScheduleExecutionLogsResponse, ScheduleRunNowRequest, ScheduleRunNowResponse, ScheduleToggleRequest, ScheduleToggleResult, StartAppLifecycleRequest, StartAppLifecycleResponse, TemplateBranchesResponse, TemplateDeployLatestRequest, TemplateDeployLatestResponse, TemplateStatusResponse, ToolExecuteRequest, ToolExecuteResponse, } from "./api.js";
|
|
3
3
|
export type { ChatRequestBody, ResponseItem, ResponseMessageItem, TemplateBootstrap, ToolCallItem, ToolOutputItem, UsageInfo, } from "./types.js";
|
|
4
4
|
export type { HostedChatCompletion, HostedChatContinuation, HostedChatMessage, HostedChatRequestOptions, HostedChatRole, HostedChatStreamDelta, HostedChatTool, HostedChatToolCall, HostedChatToolChoice, HostedChatUsage, HostedChatApiBaseUrlOptions, HostedModel, HostedModelRequestOptions, HostedModelsRequestOptions, HostedModelsResponse, HostedProvider, HostedProviderRequestOptions, HostedProvidersRequestOptions, HostedProvidersResponse, } from "./hosted-chat.js";
|
|
5
5
|
export type { OpChatCompletionSummary, OpChatSmokeOptions, OpChatSmokeSummary, OpChatStreamSummary, OpChatToolSummary, } from "./opchat-smoke.js";
|
|
6
6
|
export type { Bar as IndicatorBar, BollingerResult, MacdResult, MaCrossResult, MaCrossSignal, PriceChangeResult, } from "./indicators.js";
|
|
7
|
-
export { apiFetch, checkOpenPondApiHealth, getAppRuntimeSummary, commitFiles, createAgentFromPrompt, createRepo, createHeadlessApps, createLocalProject, deleteOrArchiveSchedule, deployApp, deployLatestTemplate, getAppEnvironment, getAppExecutionTimeline, getScheduleExecutionLog, updateAppEnvironment, executeHostedTool, executeUserTool, fetchToolManifest, getDeploymentDetail, getDeploymentLogs, getDeploymentStatus, getLatestDeploymentForApp, getOpenPondAccount,
|
|
7
|
+
export { apiFetch, checkOpenPondApiHealth, getAppRuntimeSummary, commitFiles, createAgentFromPrompt, createRepo, createHeadlessApps, createLocalProject, deleteOrArchiveSchedule, deployApp, deployLatestTemplate, getAppEnvironment, getAppExecutionTimeline, getScheduleExecutionLog, updateAppEnvironment, executeHostedTool, executeUserTool, fetchToolManifest, getDeploymentDetail, getDeploymentLogs, getDeploymentStatus, getLatestDeploymentForApp, getOpenPondAccount, getOpenToolRecipe, getOpenToolRules, getTemplateStatus, getUserPerformance, runAssistantMode, listApps, listAppSchedules, listDeploymentScheduleExecutionLogs, listOpenToolRecipes, listScheduleExecutionLogs, listTemplateBranches, listUserTools, postAgentDigest, promotePreviewToProduction, resolveWorkerBaseUrl, runScheduleNow, searchOpenToolRecipes, startAppLifecycle, startAppSchedules, stopAppSchedules, stopCurrentAppSchedules, } from "./api.js";
|
|
8
8
|
export { DEFAULT_OPENPOND_API_BASE_URL, DEFAULT_OPENPOND_CHAT_API_BASE_URL, DEFAULT_OPENPOND_OPCHAT_API_BASE_URL, DEFAULT_OPENPOND_WEB_BASE_URL, } from "./urls.js";
|
|
9
9
|
export { getOpChatModel, getOpChatProvider, listOpChatModels, listOpChatProviders, listHostedModels, listHostedProviders, resolveHostedChatApiBaseUrl, resolveOpChatApiBaseUrl, sendHostedChatTurn, streamHostedChatTurn, } from "./hosted-chat.js";
|
|
10
10
|
export { runOpChatSmoke } from "./opchat-smoke.js";
|
|
@@ -13,7 +13,7 @@ export { DEFAULT_CACHE_TTL_MS, getCachedApps, getCachedTools, setCachedApps, set
|
|
|
13
13
|
export { getConfigPath, listConfiguredProfiles, loadConfig, loadGlobalConfig, saveConfig, saveGlobalConfig, saveProfileApiKey, setActiveProfile, } from "./config.js";
|
|
14
14
|
export type { ActiveProfileSelector, ConfiguredProfile, LocalConfig, SaveProfileApiKeyInput, SetActiveProfileOptions, } from "./config.js";
|
|
15
15
|
export { consumeStream, formatStreamItem, normalizeDataFrames } from "./stream.js";
|
|
16
|
-
export type { OpenPondClientOptions, ToolSummary, ToolListResult, DeploymentWatchResult, AgentCreateStreamCallbacks, AgentCreateStreamResult, OpenPondClient, ToolListOptions, ToolRunOptions, DeployWatchOptions, TemplateTargetOptions, TemplateUpdateOptions, AppsListOptions, AppsToolsOptions, AppsPerformanceOptions, AppSummaryOptions, AppSchedulesOptions, AppSchedulesStartOptions, AppSchedulesStopOptions, ScheduleRunNowOptions, ScheduleDeleteOptions, ScheduleExecutionLogsOptions, ScheduleExecutionLogOptions, DeploymentScheduleExecutionLogsOptions, AppExecutionTimelineOptions, AppsAssistantRunOptions, ExecuteUserToolOptions, AppEnvironmentSetOptions, AppEnvironmentGetOptions, AppDeployOptions, AppPromotePreviewOptions, AppStartOptions,
|
|
16
|
+
export type { OpenPondClientOptions, ToolSummary, ToolListResult, DeploymentWatchResult, AgentCreateStreamCallbacks, AgentCreateStreamResult, OpenPondClient, ToolListOptions, ToolRunOptions, DeployWatchOptions, TemplateTargetOptions, TemplateUpdateOptions, AppsListOptions, AppsToolsOptions, AppsPerformanceOptions, AppSummaryOptions, AppSchedulesOptions, AppSchedulesStartOptions, AppSchedulesStopOptions, ScheduleRunNowOptions, ScheduleDeleteOptions, ScheduleExecutionLogsOptions, ScheduleExecutionLogOptions, DeploymentScheduleExecutionLogsOptions, AppExecutionTimelineOptions, AppsAssistantRunOptions, ExecuteUserToolOptions, AppEnvironmentSetOptions, AppEnvironmentGetOptions, AppDeployOptions, AppPromotePreviewOptions, AppStartOptions, } from "./client-types.js";
|
|
17
17
|
import type { OpenPondClientOptions, AgentCreateStreamCallbacks, AgentCreateStreamResult, OpenPondClient } from "./client-types.js";
|
|
18
18
|
export declare function consumeAgentCreateStream(response: Response, callbacks?: AgentCreateStreamCallbacks): Promise<AgentCreateStreamResult>;
|
|
19
19
|
export declare function createClient(options: OpenPondClientOptions): OpenPondClient;
|
package/dist/index.js
CHANGED
|
@@ -715,18 +715,6 @@ async function getOpenPondAccount(baseUrl, token) {
|
|
|
715
715
|
}
|
|
716
716
|
return await response.json();
|
|
717
717
|
}
|
|
718
|
-
async function getOpenPondAccountBalance(baseUrl, token) {
|
|
719
|
-
const response = await apiFetch(baseUrl, token, "/account/balance", {
|
|
720
|
-
method: "GET"
|
|
721
|
-
});
|
|
722
|
-
if (!response.ok) {
|
|
723
|
-
const text5 = await response.text().catch(() => "");
|
|
724
|
-
throw new Error(
|
|
725
|
-
`Account balance lookup failed: ${response.status} ${text5}`
|
|
726
|
-
);
|
|
727
|
-
}
|
|
728
|
-
return await response.json();
|
|
729
|
-
}
|
|
730
718
|
async function checkOpenPondApiHealth(baseUrl, token) {
|
|
731
719
|
const checkedAt = (/* @__PURE__ */ new Date()).toISOString();
|
|
732
720
|
const started = Date.now();
|
|
@@ -820,18 +808,6 @@ async function executeUserTool(baseUrl, token, body) {
|
|
|
820
808
|
data: payload
|
|
821
809
|
};
|
|
822
810
|
}
|
|
823
|
-
async function submitPositionsTx(baseUrl, token, params) {
|
|
824
|
-
const qs = params.query && Object.keys(params.query).length > 0 ? `?${new URLSearchParams(params.query).toString()}` : "";
|
|
825
|
-
const response = await apiFetch(baseUrl, token, `/apps/positions/tx${qs}`, {
|
|
826
|
-
method: params.method,
|
|
827
|
-
body: params.method === "POST" && params.body !== void 0 ? JSON.stringify(params.body) : void 0
|
|
828
|
-
});
|
|
829
|
-
if (!response.ok) {
|
|
830
|
-
const text5 = await response.text().catch(() => "");
|
|
831
|
-
throw new Error(`Positions request failed: ${response.status} ${text5}`);
|
|
832
|
-
}
|
|
833
|
-
return await response.json();
|
|
834
|
-
}
|
|
835
811
|
function normalizeToolPathSegment(toolName) {
|
|
836
812
|
const trimmed = toolName.trim().replace(/^\/+/, "");
|
|
837
813
|
return encodeURIComponent(trimmed || "tool");
|
|
@@ -2824,7 +2800,6 @@ function createClient(options) {
|
|
|
2824
2800
|
apiKey,
|
|
2825
2801
|
account: {
|
|
2826
2802
|
get: async () => getOpenPondAccount(apiUrl, apiKey),
|
|
2827
|
-
balance: async () => getOpenPondAccountBalance(apiUrl, apiKey),
|
|
2828
2803
|
health: async () => checkOpenPondApiHealth(apiUrl, apiKey)
|
|
2829
2804
|
},
|
|
2830
2805
|
chat: {
|
|
@@ -3092,25 +3067,6 @@ function createClient(options) {
|
|
|
3092
3067
|
return updateAppEnvironment(apiUrl, apiKey, input.appId, {
|
|
3093
3068
|
envVars: input.envVars
|
|
3094
3069
|
});
|
|
3095
|
-
},
|
|
3096
|
-
positionsTx: async (input) => {
|
|
3097
|
-
const method = input?.method ?? "POST";
|
|
3098
|
-
if (method !== "GET" && method !== "POST") {
|
|
3099
|
-
throw new Error("method must be GET or POST");
|
|
3100
|
-
}
|
|
3101
|
-
let query = input?.query;
|
|
3102
|
-
if (!query && input?.params) {
|
|
3103
|
-
query = {};
|
|
3104
|
-
for (const [key, value] of Object.entries(input.params)) {
|
|
3105
|
-
if (value === void 0) continue;
|
|
3106
|
-
query[key] = typeof value === "string" ? value : JSON.stringify(value);
|
|
3107
|
-
}
|
|
3108
|
-
}
|
|
3109
|
-
return submitPositionsTx(apiUrl, apiKey, {
|
|
3110
|
-
method,
|
|
3111
|
-
body: method === "POST" ? input?.body : void 0,
|
|
3112
|
-
query
|
|
3113
|
-
});
|
|
3114
3070
|
}
|
|
3115
3071
|
},
|
|
3116
3072
|
repo: {
|
|
@@ -23866,11 +23822,8 @@ async function loadProfileSkillDirectory(profileSourcePath2, directoryName) {
|
|
|
23866
23822
|
const relativePath = path5.join(PROFILE_SKILLS_DIR, directoryName, PROFILE_SKILL_FILE).replace(/\\/g, "/");
|
|
23867
23823
|
const absolutePath = path5.join(profileSourcePath2, relativePath);
|
|
23868
23824
|
const messages = [];
|
|
23869
|
-
const
|
|
23870
|
-
|
|
23871
|
-
if (entry.name === PROFILE_SKILL_FILE && entry.isFile()) continue;
|
|
23872
|
-
messages.push(`Profile skills only support ${PROFILE_SKILL_FILE}; unsupported entry: ${entry.name}`);
|
|
23873
|
-
}
|
|
23825
|
+
const packageRoot = path5.join(profileSourcePath2, PROFILE_SKILLS_DIR, directoryName);
|
|
23826
|
+
const packageFiles = await listPackageFiles(packageRoot);
|
|
23874
23827
|
let contents = "";
|
|
23875
23828
|
if (!existsSync2(absolutePath)) {
|
|
23876
23829
|
messages.push(`Missing ${PROFILE_SKILL_FILE}.`);
|
|
@@ -23900,9 +23853,26 @@ async function loadProfileSkillDirectory(profileSourcePath2, directoryName) {
|
|
|
23900
23853
|
charCount: contents.length,
|
|
23901
23854
|
sourceHash: sha256Hex(contents),
|
|
23902
23855
|
validationStatus: messages.length > 0 ? "error" : "valid",
|
|
23903
|
-
validationMessages: messages
|
|
23856
|
+
validationMessages: messages,
|
|
23857
|
+
resourceFiles: packageFiles.filter((file2) => file2 !== PROFILE_SKILL_FILE)
|
|
23904
23858
|
};
|
|
23905
23859
|
}
|
|
23860
|
+
async function listPackageFiles(root) {
|
|
23861
|
+
const files = [];
|
|
23862
|
+
async function visit(directory, prefix) {
|
|
23863
|
+
const entries = await readdir(directory, { withFileTypes: true });
|
|
23864
|
+
await Promise.all(entries.map(async (entry) => {
|
|
23865
|
+
const relativePath = prefix ? `${prefix}/${entry.name}` : entry.name;
|
|
23866
|
+
if (entry.isDirectory()) {
|
|
23867
|
+
await visit(path5.join(directory, entry.name), relativePath);
|
|
23868
|
+
} else if (entry.isFile()) {
|
|
23869
|
+
files.push(relativePath);
|
|
23870
|
+
}
|
|
23871
|
+
}));
|
|
23872
|
+
}
|
|
23873
|
+
await visit(root, "");
|
|
23874
|
+
return files.sort();
|
|
23875
|
+
}
|
|
23906
23876
|
function markDuplicateSkillNames(skills) {
|
|
23907
23877
|
const counts = /* @__PURE__ */ new Map();
|
|
23908
23878
|
for (const skill of skills) {
|
|
@@ -23921,9 +23891,13 @@ function markDuplicateSkillNames(skills) {
|
|
|
23921
23891
|
async function latestSkillMtime(profileSourcePath2, skills) {
|
|
23922
23892
|
let latest = 0;
|
|
23923
23893
|
for (const skill of skills) {
|
|
23924
|
-
const
|
|
23925
|
-
|
|
23926
|
-
|
|
23894
|
+
const packageRoot = path5.dirname(path5.join(profileSourcePath2, skill.path));
|
|
23895
|
+
const packageFiles = [PROFILE_SKILL_FILE, ...skill.resourceFiles];
|
|
23896
|
+
for (const file2 of packageFiles) {
|
|
23897
|
+
const fileStat = await stat2(path5.join(packageRoot, file2)).catch(() => null);
|
|
23898
|
+
if (!fileStat?.isFile()) continue;
|
|
23899
|
+
latest = Math.max(latest, fileStat.mtimeMs);
|
|
23900
|
+
}
|
|
23927
23901
|
}
|
|
23928
23902
|
return latest > 0 ? new Date(latest).toISOString() : null;
|
|
23929
23903
|
}
|
|
@@ -25610,7 +25584,6 @@ export {
|
|
|
25610
25584
|
getOpChatModel,
|
|
25611
25585
|
getOpChatProvider,
|
|
25612
25586
|
getOpenPondAccount,
|
|
25613
|
-
getOpenPondAccountBalance,
|
|
25614
25587
|
getOpenToolRecipe,
|
|
25615
25588
|
getOpenToolRules,
|
|
25616
25589
|
getScheduleExecutionLog,
|
|
@@ -25678,7 +25651,6 @@ export {
|
|
|
25678
25651
|
stopAppSchedules,
|
|
25679
25652
|
stopCurrentAppSchedules,
|
|
25680
25653
|
streamHostedChatTurn,
|
|
25681
|
-
submitPositionsTx,
|
|
25682
25654
|
updateAppEnvironment,
|
|
25683
25655
|
validateSandboxTemplateManifest,
|
|
25684
25656
|
validateSandboxTemplateYaml
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as s,j as w}from"./index-
|
|
1
|
+
import{r as s,j as w}from"./index-KoQSSt_f.js";const d=[],v=["button:not([disabled])","[href]","input:not([disabled])","select:not([disabled])","textarea:not([disabled])","[tabindex]:not([tabindex='-1'])","[contenteditable='true']"].join(",");function T({ariaLabel:r,backdropClassName:o="training-dialog-backdrop",children:a,className:i,contained:t=!1,dismissDisabled:e=!1,initialFocusKey:u,inertExclusionSelector:p,onClose:m}){const f=s.useRef(null),A=s.useRef(Symbol("app-dialog")),b=s.useRef(null),h=s.useRef(e),g=s.useRef(m);h.current=e,g.current=m,s.useEffect(()=>{const n=A.current;b.current=document.activeElement instanceof HTMLElement?document.activeElement:null,d.push(n);const l=t?f.current?.closest(".main-pane")??null:null,E=I(f.current,l,p);function y(c){if(d.at(-1)===n){if(c.key==="Escape"){c.preventDefault(),c.stopPropagation(),h.current||g.current();return}c.key!=="Tab"||t||F(c,f.current)}}return document.addEventListener("keydown",y,!0),()=>{document.removeEventListener("keydown",y,!0);const c=d.lastIndexOf(n);c>=0&&d.splice(c,1),E();const x=b.current;x?.isConnected&&x.focus()}},[t,p]),s.useEffect(()=>{const n=window.requestAnimationFrame(()=>{const l=f.current;(l?.querySelector("[data-autofocus]")??l)?.focus()});return()=>window.cancelAnimationFrame(n)},[u]);function R(n){n.target===n.currentTarget&&!e&&m()}function k(n){n.key==="Escape"&&n.stopPropagation()}return w.jsx("div",{className:o,role:"presentation",onMouseDown:R,children:w.jsx("section",{ref:f,"aria-busy":e||void 0,"aria-label":r,"aria-modal":t?void 0:"true",className:i,role:"dialog",tabIndex:-1,onKeyDown:k,onMouseDown:n=>n.stopPropagation(),children:a})})}function D(r){return r?Array.from(r.querySelectorAll(v)).filter(o=>!o.hidden&&o.getAttribute("aria-hidden")!=="true"):[]}function F(r,o){if(!o)return;const a=D(o);if(a.length===0){r.preventDefault(),o.focus();return}const i=a.indexOf(document.activeElement),t=r.shiftKey?i<=0?a.length-1:i-1:i<0||i===a.length-1?0:i+1;r.preventDefault(),a[t]?.focus()}function I(r,o=null,a){if(!r)return()=>{};const i=[];let t=r.parentElement??r;for(;t.parentElement&&t!==document.body;){const e=t.parentElement;for(const u of Array.from(e.children))u===t||!(u instanceof HTMLElement)||a&&u.matches(a)||(i.push({element:u,ariaHidden:u.getAttribute("aria-hidden"),inert:u.inert}),u.inert=!0,u.setAttribute("aria-hidden","true"));if(t=e,o&&t===o)break}return()=>{for(const e of i.reverse())e.element.inert=e.inert,e.ariaHidden===null?e.element.removeAttribute("aria-hidden"):e.element.setAttribute("aria-hidden",e.ariaHidden)}}export{T as A};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r,
|
|
1
|
+
import{r,a$ as b,n as L,j as e,S as I,a2 as k,X as P,b0 as E,T as F,E as U,b1 as T,b2 as R}from"./index-KoQSSt_f.js";const D=["For agents","Featured","Productivity","Developer tools"],M=new Set(["slack","google","github","mcp"]);function J({account:s,connection:n,defaultTeamId:a,onToast:o}){const[c,f]=r.useState(null),[p,v]=r.useState(""),[i,y]=r.useState("For agents"),[u,h]=r.useState(()=>b()),[g,d]=r.useState("idle"),[w,x]=r.useState(null),S=s?.baseUrl??s?.activeProfile?.baseUrl??null,C=O(a,w),N=r.useMemo(()=>u.filter(t=>z(t,i)).filter(t=>q(t,p)),[i,p,u]);r.useEffect(()=>{let t=!0;return n?(d("loading"),L.connectedAppStatus(n,{status:"all"}).then(l=>{t&&(h(l.apps),x(l.teamId?.trim()||null),d("ready"))}).catch(l=>{t&&(console.warn("Unable to load connected app status.",l),h(b()),x(null),d("error"))}),()=>{t=!1}):(h(b()),d("idle"),x(null),()=>{t=!1})},[n]);function A(t){const l=T({appId:t.id,baseUrl:S,teamId:C});V(l).catch(j=>{o?.(j instanceof Error?j.message:String(j),"error")})}return e.jsxs("section",{className:"connected-apps-view","aria-label":"Apps",children:[e.jsxs("div",{className:"connected-apps-header",children:[e.jsxs("div",{children:[e.jsx("h1",{children:"Apps"}),e.jsx("p",{children:"Connect apps that agents can use for chat, knowledge, files, and workflow actions."})]}),e.jsxs("label",{className:"connected-apps-search",children:[e.jsx(I,{size:15}),e.jsx("input",{"aria-label":"Search apps",onChange:t=>v(t.target.value),placeholder:"Search apps",type:"search",value:p})]})]}),e.jsxs("div",{className:`connected-apps-status-strip ${g}`,children:[e.jsx("span",{children:W(g)}),e.jsxs("span",{children:[X(u)," connected"]})]}),e.jsxs("section",{className:"connected-apps-hero","aria-label":"App context",children:[e.jsxs("div",{className:"connected-apps-hero-copy",children:[e.jsx("span",{className:"connected-apps-hero-icon",children:e.jsx(m,{appId:"github"})}),e.jsx("h2",{children:"Work with your apps"}),e.jsx("p",{children:"Bring repositories, documents, chat, calendars, and custom MCP tools into OpenPond."})]}),e.jsxs("div",{className:"connected-apps-context-card","aria-hidden":"true",children:[e.jsx("strong",{children:"Agent context"}),e.jsxs("div",{children:[e.jsx("span",{className:"files",children:"Files"}),e.jsx("span",{className:"chat",children:"Chat"}),e.jsx("span",{className:"oauth",children:"OAuth"}),e.jsx("span",{className:"mcp",children:"MCP"})]})]})]}),e.jsx("div",{className:"connected-apps-filters",role:"tablist","aria-label":"App categories",children:D.map(t=>e.jsx("button",{"aria-selected":i===t,className:i===t?"active":"",onClick:()=>y(t),role:"tab",type:"button",children:t},t))}),e.jsxs("div",{className:"connected-apps-list",children:[N.map(t=>e.jsx($,{app:t,onSelect:()=>f(t)},t.id)),N.length===0?e.jsx("div",{className:"connected-apps-empty",children:"No apps match the current search."}):null]}),c?e.jsx(_,{app:c,onClose:()=>f(null),onInstall:()=>A(c)}):null]})}function O(s,n){const a=s?.trim();return a||n?.trim()||null}function $({app:s,onSelect:n}){return e.jsxs("button",{className:"connected-app-row",onClick:n,type:"button",children:[e.jsxs("span",{className:"connected-app-row-main",children:[e.jsx(m,{appId:s.id}),e.jsxs("span",{className:"connected-app-copy",children:[e.jsxs("span",{className:"connected-app-title",children:[e.jsx("strong",{children:s.label}),e.jsxs("span",{children:[s.shortLabel!==s.label?s.shortLabel:s.category," / ",s.setupSurfaceLabel]})]}),e.jsx("span",{children:s.description}),e.jsxs("span",{className:"connected-app-capability-row",children:[s.capabilityLabels.slice(0,2).map(a=>e.jsx("span",{children:a},a)),s.capabilityLabels.length>2?e.jsxs("span",{children:["+",s.capabilityLabels.length-2]}):null]})]})]}),e.jsx("span",{className:`connected-app-status-pill ${s.status}`,children:s.statusLabel}),e.jsx(k,{size:16})]})}function _({app:s,onClose:n,onInstall:a}){const o=s.connections.filter(c=>c.status==="active");return e.jsx("div",{className:"connected-app-dialog-backdrop",role:"presentation",onMouseDown:c=>{c.target===c.currentTarget&&n()},children:e.jsxs("section",{className:"connected-app-dialog",role:"dialog","aria-modal":"true","aria-labelledby":"connected-app-dialog-title",children:[e.jsx("button",{className:"connected-app-dialog-close",type:"button","aria-label":"Close app details",onClick:n,children:e.jsx(P,{size:17})}),e.jsxs("div",{className:"connected-app-dialog-identity",children:[e.jsx("span",{className:"openpond-mark",children:e.jsx("img",{alt:"",src:E})}),e.jsxs("span",{className:"connection-dots","aria-hidden":"true",children:[e.jsx("span",{}),e.jsx("span",{}),e.jsx("span",{})]}),e.jsx(m,{appId:s.id})]}),e.jsxs("h2",{id:"connected-app-dialog-title",children:["Connect ",s.label]}),e.jsxs("div",{className:"connected-app-approval",children:[e.jsx(F,{size:16}),e.jsx("span",{children:s.statusLabel})]}),e.jsxs("div",{className:"connected-app-dialog-body",children:[e.jsxs("section",{children:[e.jsx("h3",{children:s.setupSurfaceLabel}),e.jsx("p",{children:"The web flow shows the provider account, workspace, and requested access before anything is connected."})]}),e.jsxs("section",{children:[e.jsx("h3",{children:"Connected account"}),e.jsx("p",{children:G(o)})]}),e.jsxs("section",{children:[e.jsx("h3",{children:"Available capabilities"}),e.jsx("div",{className:"connected-app-dialog-capabilities",children:s.capabilities.map(c=>e.jsx("span",{children:c.label},c.id))})]}),e.jsxs("section",{children:[e.jsx("h3",{children:"Sandbox lease policy"}),e.jsx("p",{children:s.leasePolicy.leaseable?`Leaseable for ${s.leasePolicy.defaultTtlSeconds??0} seconds with scoped proxy access.`:"Managed as setup or tool discovery; no OAuth lease is required."})]})]}),e.jsxs("button",{className:"connected-app-dialog-primary",type:"button",onClick:a,children:[e.jsx("span",{children:s.installLabel}),e.jsx(U,{size:15})]})]})})}function m({appId:s}){return e.jsx("span",{className:`connected-app-icon app-${s}`,children:e.jsx("img",{alt:"",src:B(s)})})}function z(s,n){return n==="For agents"?!0:n==="Featured"?M.has(s.id):n==="Productivity"?s.category==="Productivity"||s.category==="Chat":s.category==="Developer tools"||s.id==="mcp"}function q(s,n){const a=n.trim().toLowerCase();return a?[s.id,s.label,s.shortLabel,s.category,s.description,s.providerFamily,s.setupSurface].some(o=>o.toLowerCase().includes(a)):!0}function B(s){return R(s)}async function V(s){const n=window.openpond?.browser;if(n){const a=await n.openExternal({conversationId:"connected-apps",url:s});if(!a.ok)throw new Error(a.error??"Unable to open app setup.");return}window.open(s,"_blank","noopener,noreferrer")}function W(s){return s==="loading"?"Checking connections":s==="ready"?"Connection status current":s==="error"?"Connection status unavailable":"Connection status pending"}function X(s){return s.filter(n=>n.connected).length}function G(s){return s.length===0?"No active OAuth connection for this setup surface.":s.map(n=>{const a=n.accountLabel??"Connected account";return n.workspaceLabel?`${a} / ${n.workspaceLabel}`:a}).join(", ")}export{J as AppsView,$ as ConnectedAppRow,O as connectedAppSetupTeamId};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as c,bE as v,j as a,
|
|
1
|
+
import{r as c,bE as v,j as a,aJ as f,X as k,k as j,V as C,aG as g,an as B,E as y,aK as N}from"./index-KoQSSt_f.js";import{R as T}from"./refresh-cw-BAaaPCXl.js";const x=[];function E(r){const e=window.openpond?.browser,[b,l]=c.useState(()=>({conversationId:r,activeTabId:null,tabs:x}));c.useEffect(()=>{if(l({conversationId:r,activeTabId:null,tabs:x}),!e)return;let s=!1;e.getState({conversationId:r}).then(o=>{s||l(o)});const n=e.onState(o=>{o.conversationId===r&&l(o)});return()=>{s=!0,n()}},[e,r]);const u=c.useMemo(()=>b.tabs.find(s=>s.id===b.activeTabId)??null,[b.activeTabId,b.tabs]),t=c.useCallback(async(s,n={})=>{if(!e)return!1;const o=v(s,{explicitFile:n.explicitFile});return o?(n.newTab?await e.newTab({conversationId:r,url:o,explicitFile:n.explicitFile}):await e.open({conversationId:r,url:o,explicitFile:n.explicitFile}),!0):!1},[e,r]),i=u?{conversationId:r,tabId:u.id}:null;return{activeTab:u,available:!!e,bridge:e,state:b,back:()=>e&&i?e.back(i):Promise.resolve({ok:!1}),clearData:()=>e?e.clearData({conversationId:r}):Promise.resolve({ok:!1}),closeTab:s=>e?e.closeTab({conversationId:r,tabId:s}):Promise.resolve({ok:!1}),forward:()=>e&&i?e.forward(i):Promise.resolve({ok:!1}),newTab:s=>e?e.newTab({conversationId:r,url:s}):Promise.resolve({ok:!1}),open:t,openExternal:()=>e&&i?e.openExternal(i):Promise.resolve({ok:!1}),reload:()=>e&&i?e.reload(i):Promise.resolve({ok:!1}),snapshot:(s={})=>e?e.snapshot({conversationId:r,...s}):Promise.resolve({ok:!1,output:"Desktop browser bridge unavailable."}),moveCursor:s=>e?e.moveCursor({conversationId:r,...s}):Promise.resolve({ok:!1,output:"Desktop browser bridge unavailable."}),click:s=>e?e.click({conversationId:r,...s}):Promise.resolve({ok:!1,output:"Desktop browser bridge unavailable."}),typeText:s=>e?e.typeText({conversationId:r,...s}):Promise.resolve({ok:!1,output:"Desktop browser bridge unavailable."}),key:s=>e?e.key({conversationId:r,...s}):Promise.resolve({ok:!1,output:"Desktop browser bridge unavailable."}),scroll:s=>e?e.scroll({conversationId:r,...s}):Promise.resolve({ok:!1,output:"Desktop browser bridge unavailable."}),selectTab:s=>e?e.selectTab({conversationId:r,tabId:s}):Promise.resolve({ok:!1}),setBounds:s=>e?e.setBounds({conversationId:r,bounds:s}):Promise.resolve({ok:!1}),stop:()=>e&&i?e.stop(i):Promise.resolve({ok:!1})}}function P({activeTabId:r,tabs:e,onCloseTab:b,onNewTab:l,onSelectTab:u}){return a.jsxs("div",{className:"browser-tabs",role:"tablist","aria-label":"Browser tabs",children:[e.map(t=>a.jsxs("div",{className:`browser-tab ${t.id===r?"active":""}`,children:[a.jsx("span",{className:"browser-tab-favicon","aria-hidden":"true",children:t.faviconUrl?a.jsx("img",{alt:"",referrerPolicy:"no-referrer",src:t.faviconUrl}):a.jsx(f,{size:13})}),a.jsx("button",{type:"button",className:"browser-tab-main",role:"tab","aria-selected":t.id===r,title:t.url,onClick:()=>u(t.id),children:R(t)}),a.jsx("button",{type:"button",className:"browser-tab-close",title:"Close tab","aria-label":"Close tab",onClick:()=>b(t.id),children:a.jsx(k,{size:12})})]},t.id)),a.jsx("button",{type:"button",className:"browser-tab-add",title:"New tab","aria-label":"New tab",onClick:l,children:a.jsx(j,{size:14})})]})}function R(r){if(r.title?.trim())return r.title.trim();try{return new URL(r.url).host||r.url}catch{return r.url||"New tab"}}function z({activeTab:r,available:e,onBack:b,onClearData:l,onForward:u,onNavigate:t,onOpenExternal:i,onReload:s,onStop:n}){const[o,d]=c.useState(""),[p,m]=c.useState(!1);c.useEffect(()=>{d(r?.url??"")},[r?.url]);function h(w){w.preventDefault(),t(o)}return a.jsxs("div",{className:"browser-toolbar",children:[a.jsxs("div",{className:"browser-nav-actions",children:[a.jsx("button",{type:"button",title:"Back","aria-label":"Back",disabled:!r?.canGoBack,onClick:b,children:a.jsx(C,{size:15})}),a.jsx("button",{type:"button",title:"Forward","aria-label":"Forward",disabled:!r?.canGoForward,onClick:u,children:a.jsx(g,{size:15})}),a.jsx("button",{type:"button",title:r?.loading?"Stop":"Reload","aria-label":r?.loading?"Stop":"Reload",disabled:!r,onClick:r?.loading?n:s,children:r?.loading?a.jsx(B,{size:13}):a.jsx(T,{size:14})})]}),a.jsx("form",{className:"browser-address-form",onSubmit:h,children:a.jsx("input",{"aria-label":"Browser address",disabled:!e,placeholder:e?"Search or enter address":"Desktop browser unavailable",spellCheck:!1,value:o,onChange:w=>d(w.target.value)})}),a.jsxs("div",{className:"browser-panel-actions",children:[a.jsx("button",{type:"button",title:"Open external","aria-label":"Open external",disabled:!r,onClick:i,children:a.jsx(y,{size:14})}),a.jsxs("div",{className:"browser-menu-anchor",children:[a.jsx("button",{type:"button",title:"Browser actions","aria-label":"Browser actions",onClick:()=>m(w=>!w),children:a.jsx(N,{size:15})}),p&&a.jsx("div",{className:"browser-options-menu",role:"menu",children:a.jsx("button",{type:"button",role:"menuitem",onClick:()=>{m(!1),l()},children:"Clear Browser Data..."})})]})]})]})}function D({active:r,onBounds:e}){const b=c.useRef(null),l=c.useRef(null),u=c.useRef(null),t=c.useCallback(n=>{const o=n?`${n.x}:${n.y}:${n.width}:${n.height}`:"null";l.current!==o&&(l.current=o,e(n))},[e]),i=c.useCallback(()=>{const n=b.current;if(!r||!n){t(null);return}const o=n.getBoundingClientRect(),d=Math.max(0,Math.round(o.width)),p=Math.max(0,Math.round(o.height));if(d===0||p===0){t(null);return}t({x:Math.round(o.left),y:Math.round(o.top),width:d,height:p})},[r,t]),s=c.useCallback(()=>{u.current===null&&(u.current=window.requestAnimationFrame(()=>{u.current=null,i()}))},[i]);return c.useLayoutEffect(()=>{l.current=null,i();const n=b.current;if(!r||!n)return t(null),()=>t(null);const o=new ResizeObserver(s);return o.observe(n),window.addEventListener("resize",s),window.addEventListener("scroll",s,!0),()=>{u.current!==null&&(window.cancelAnimationFrame(u.current),u.current=null),o.disconnect(),window.removeEventListener("resize",s),window.removeEventListener("scroll",s,!0),t(null)}},[r,t,i,s]),a.jsx("div",{className:"browser-viewport",ref:b})}function L({conversationId:r,expanded:e,onResizeStart:b}){const l=E(r),u=c.useCallback(s=>{window.openpond?.browser?.setBounds({conversationId:r,bounds:s})},[r]),t=c.useCallback(s=>{l.open(s,{explicitFile:!0})},[l]),i=c.useCallback(()=>{window.confirm("Clear browser data for this conversation? Tabs, cookies, cache, and local storage for this conversation will be removed.")&&l.clearData()},[l]);return a.jsxs("aside",{className:`workspace-diff-panel browser-sidebar-panel ${e?"expanded":""}`,"aria-label":"Browser",children:[!e&&a.jsx("div",{className:"workspace-diff-resize-handle",role:"separator","aria-orientation":"vertical","aria-label":"Resize browser panel",onPointerDown:b}),a.jsx(P,{activeTabId:l.state.activeTabId,tabs:l.state.tabs,onCloseTab:s=>{l.closeTab(s)},onNewTab:()=>{l.newTab()},onSelectTab:s=>{l.selectTab(s)}}),a.jsx(z,{activeTab:l.activeTab,available:l.available,onBack:()=>{l.back()},onClearData:i,onForward:()=>{l.forward()},onNavigate:t,onOpenExternal:()=>{l.openExternal()},onReload:()=>{l.reload()},onStop:()=>{l.stop()}}),a.jsxs("div",{className:"browser-content",children:[l.available?l.state.tabs.length===0?a.jsxs("div",{className:"browser-empty-state",children:[a.jsx(f,{size:18}),a.jsx("span",{children:"Enter a URL to open a browser tab for this conversation."})]}):null:a.jsxs("div",{className:"browser-empty-state",children:[a.jsx(f,{size:18}),a.jsx("span",{children:"Desktop browser bridge unavailable."})]}),a.jsx(D,{active:l.available&&l.state.tabs.length>0,onBounds:u})]})]})}export{L as BrowserSidebar};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{u as ye,r,a8 as Ne,j as e,V as ke,b as B,ao as ee,k as D,bV as se,bW as ne,D as te,A as Se,bX as Ae,S as we,N as ie,Z as H,aC as Re,X as Te,bY as ae}from"./index-Cr_RZ7GD.js";import{P as Pe}from"./play-BLRANWaV.js";import{createPipelineAgentIdFromObjective as le,createPipelineSourceRootPathForAgent as _e}from"./create-pipeline-request-vxgKoAvv.js";function ze(s,t){return t==="archive"?!!s.archivedAt:t==="reviews"?s.status==="needs_review":!s.archivedAt}function $e(s){return s==="backlog"?"Task":s==="needs_review"?"Review":s.replace(/_/g," ")}function Me(s,t){const a=s.get(t);return a?.organizationName?`${a.organizationName} / ${a.name}`:a?.name??"Cloud Project"}function Ee(s){const t=s.filter(a=>!oe(a));return t.find(a=>a.role==="user")??t[0]??null}function oe(s){return s.metadata.source==="openpond_app_cloud_create_improve_link"||s.metadata.hidden===!0}function Oe(s){return s.adapter.kind==="local"?"Local profile":s.adapter.kind==="promote_local_to_hosted"?"Local to hosted":"Hosted profile"}function Le(s){return s?.plan?.checks?.length?s.plan.checks.map(t=>({name:t.name,command:t.command})):[{name:"inspect",command:"pnpm agent:inspect"},{name:"build",command:"pnpm build"},{name:"validate",command:"pnpm agent:validate"},{name:"eval",command:"pnpm agent:eval"}]}function De(s){return s?.plan?.requirements?.map(t=>({name:t.name,detail:[t.kind.replace(/_/g," "),t.status,t.detail].filter(Boolean).join(" / ")}))??[]}function He(s){const t=s?.workflowCapture;return t?[{name:"Actions",values:t.profileActions},{name:"Providers",values:t.externalProviders},{name:"Side effects",values:t.sideEffects},{name:"Files",values:t.files},{name:"Artifacts",values:t.outputArtifacts},{name:"Traces",values:t.traceRefs},{name:"Channels",values:t.channelTargets}].flatMap(({name:a,values:u})=>u.length?[{name:a,detail:u.join(", ")}]:[]):[]}function qe(s){if(s.plan?.sourcePlan?.length)return s.plan.sourcePlan;const t=s.operation==="improve"?"update":"create",a=s.target.kind==="agent"?s.target.id??le(s.objective):le(s.objective);return[{path:_e(a),operation:t,reason:s.objective},{path:"settings/profile.yaml",operation:"update",reason:"Expose the default chat action through the hosted profile catalog."}]}function Fe({workItem:s,detail:t,actionBusy:a,localProjectName:u,onApplyLocalPatch:x,onShowFiles:o}){const d=Xe(s,t),m=s.status==="needs_review"&&!!(u&&x);return e.jsxs("article",{className:"cloud-work-boundary-strip",children:[e.jsxs("div",{children:[e.jsx("span",{children:Ke(s)}),e.jsx("small",{children:Ve(s)})]}),e.jsx("div",{className:"cloud-work-boundary-chips",children:d.map(j=>e.jsx("span",{children:j},j))}),s.status==="needs_review"?e.jsxs("button",{type:"button",onClick:()=>{x&&x()},disabled:a||!m,title:m?`Apply to ${u}`:"Link this Cloud Project to a local checkout before applying locally.",children:[e.jsx(ie,{size:13}),e.jsx("span",{children:m?"Apply locally":"No local checkout"})]}):null,o?e.jsxs("button",{type:"button",onClick:o,children:[e.jsx(H,{size:13}),e.jsx("span",{children:"Files"})]}):null]})}function Ke(s){return s.status==="needs_review"?"Cloud patch ready":s.status==="queued"||s.status==="running"?"Running in Cloud":s.status==="failed"?"Cloud task failed":"Cloud task"}function Ve(s){return s.status==="needs_review"?"Review files and apply locally only when ready.":s.status==="queued"||s.status==="running"?"The local checkout is unchanged while the sandbox works.":s.status==="failed"?"Open files/logs to inspect the remote run before retrying.":"Cloud changes stay remote until an explicit apply or pull action."}function Xe(s,t){const a=[s.status.replace(/_/g," ")];return s.sourceRef&&a.push(s.sourceRef),s.latestSandboxId&&a.push("sandbox"),s.latestTaskRunId&&a.push("task run"),t?.activity.length&&a.push(`${t.activity.length} log${t.activity.length===1?"":"s"}`),s.status==="needs_review"&&a.push("patch only"),a.push("local unchanged"),a}function Ue({run:s,actionBusy:t,onApprove:a,onEdit:u,onCancel:x}){const o=s.state,d=s.plan,m=Le(s),j=De(s),f=He(s),N=qe(s),h=Re(d?.metadata),k=s.scope.targetProject?.name??s.scope.targetProject?.id??"Profile source",S=!!d&&o==="awaiting_plan_approval"&&(d?.status==="draft"||d?.status==="pending_approval"),A=(o==="planning"||o==="awaiting_plan_approval")&&(d?.status==="draft"||d?.status==="pending_approval");return e.jsxs("article",{className:"cloud-create-plan-review",children:[e.jsxs("div",{className:"cloud-create-plan-heading",children:[e.jsx(H,{size:16}),e.jsxs("div",{children:[e.jsx("span",{children:"Agent plan review"}),e.jsxs("small",{children:[s.operation," / ",Oe(s)," / ",o.replace(/_/g," ")]})]})]}),e.jsxs("div",{className:"cloud-create-plan-copy",children:[e.jsxs("section",{children:[e.jsx("span",{children:"Objective"}),e.jsx("p",{children:s.objective})]}),e.jsxs("section",{children:[e.jsx("span",{children:"Target"}),e.jsx("p",{children:k})]}),d?.capturedContextSummary?e.jsxs("section",{children:[e.jsx("span",{children:"Captured context"}),e.jsx("p",{children:d.capturedContextSummary})]}):s.context.targetRepoAssumptions.length?e.jsxs("section",{children:[e.jsx("span",{children:"Captured context"}),e.jsx("p",{children:s.context.targetRepoAssumptions.join("; ")})]}):null,s.context.attachments.length?e.jsxs("section",{children:[e.jsx("span",{children:"Inputs"}),e.jsx("p",{children:s.context.attachments.map(l=>l.name).join(", ")})]}):null,s.context.apps.length?e.jsxs("section",{children:[e.jsx("span",{children:"Apps"}),e.jsx("p",{children:s.context.apps.map(l=>l.name).join(", ")})]}):null,s.context.tools.length?e.jsxs("section",{children:[e.jsx("span",{children:"Tools"}),e.jsx("p",{children:s.context.tools.map(l=>l.name).join(", ")})]}):null,h?e.jsxs("section",{children:[e.jsx("span",{children:"Action shape"}),e.jsxs("p",{children:[h.label,": ",h.detail]})]}):null]}),e.jsxs("div",{className:"cloud-create-plan-grid",children:[h?e.jsxs("section",{children:[e.jsx("span",{children:"Actions"}),e.jsxs("ul",{children:[e.jsxs("li",{children:[e.jsx("code",{children:h.defaultActionKey??"chat"}),e.jsx("small",{children:h.label})]}),h.directActionHint?e.jsxs("li",{children:[e.jsx("code",{children:"direct action"}),e.jsx("small",{children:h.directActionHint})]}):null]})]}):null,e.jsxs("section",{children:[e.jsx("span",{children:"Source plan"}),e.jsx("ul",{children:N.map(l=>e.jsxs("li",{children:[e.jsx("code",{children:l.path}),e.jsx("small",{children:l.operation})]},`${l.operation}:${l.path}`))})]}),e.jsxs("section",{children:[e.jsx("span",{children:"Checks"}),e.jsx("ul",{children:m.map(l=>e.jsxs("li",{children:[e.jsx("code",{children:l.name}),e.jsx("small",{children:l.command})]},`${l.name}:${l.command}`))})]}),j.length?e.jsxs("section",{children:[e.jsx("span",{children:"Requirements"}),e.jsx("ul",{children:j.map(l=>e.jsxs("li",{children:[e.jsx("code",{children:l.name}),e.jsx("small",{children:l.detail})]},`${l.name}:${l.detail}`))})]}):null,f.length?e.jsxs("section",{children:[e.jsx("span",{children:"Workflow evidence"}),e.jsx("ul",{children:f.map(l=>e.jsxs("li",{children:[e.jsx("code",{children:l.name}),e.jsx("small",{children:l.detail})]},`${l.name}:${l.detail}`))})]}):null]}),e.jsxs("div",{className:"cloud-create-plan-actions",children:[e.jsxs("button",{type:"button",onClick:a,disabled:t||!S,children:[e.jsx(ie,{size:14}),e.jsx("span",{children:"Confirm plan"})]}),e.jsxs("button",{type:"button",onClick:u,disabled:t||!A,children:[e.jsx(H,{size:14}),e.jsx("span",{children:"Edit plan"})]}),e.jsxs("button",{type:"button",onClick:x,disabled:t,children:[e.jsx(Te,{size:14}),e.jsx("span",{children:"Cancel"})]})]})]})}function Je({projects:s,workItems:t,selectedWorkItem:a,detail:u,loading:x,actionBusy:o,connection:d,error:m,model:j,showToast:f,onBack:N,onModelChange:h,onSetupCloudProject:k,onCreateWork:S,onSelectWorkItem:A,onSendMessage:l,onHandleBackground:q,onCancelCreatePlan:ce,onCancelTask:F,localProjectName:re,onApplyLocalPatch:de,onShowFiles:w}){ye(m);const[y,R]=r.useState(""),[b,g]=r.useState(""),K=r.useRef(null),T=r.useRef(null),[ue,V]=r.useState(0),[pe,P]=r.useState(0),[X,_]=r.useState(!1),[U,Y]=r.useState(!1),[C,z]=r.useState("tasks"),[$,he]=r.useState(""),[Z,xe]=r.useState(()=>s[0]?.id??""),M=r.useMemo(()=>new Map(s.map(n=>[n.id,n])),[s]),v=M.has(Z)?Z:s[0]?.id??"",me=Ne("openpond",j),je=r.useMemo(()=>s.length?s.map(n=>({value:n.id,label:n.organizationName?`${n.organizationName} / ${n.name}`:n.name,shortLabel:n.name,description:n.sourceLabel??n.defaultBranch??void 0})):[{value:"",label:"No Cloud Project"}],[s]),G=r.useMemo(()=>{const n=$.trim().toLowerCase();return t.filter(c=>ze(c,C)?n?c.title.toLowerCase().includes(n):!0:!1)},[$,C,t]);async function J(){const n=y.trim();!n||!v||o||(await S({projectId:v,prompt:n}),R(""),_(!1))}async function Q(){const n=b.trim();!n||o||(await l(n),g(""))}async function ve(){const n=b.trim();await q(n||null),g(""),Y(!1)}function E(n){V(n.selectionStart??n.value.length)}function O(n){P(n.selectionStart??n.value.length)}function fe(n){const c=K.current,p=ae(y,n,c?.selectionStart??ue);R(p.value),V(p.cursorIndex),window.requestAnimationFrame(()=>{c?.focus(),c?.setSelectionRange(p.cursorIndex,p.cursorIndex)})}function be(n){const c=T.current,p=ae(b,n,c?.selectionStart??pe);g(p.value),P(p.cursorIndex),window.requestAnimationFrame(()=>{c?.focus(),c?.setSelectionRange(p.cursorIndex,p.cursorIndex)})}function ge(){g(n=>n||"Revise plan: "),window.requestAnimationFrame(()=>{const n=T.current,c=n?.value.length??0;n?.focus(),n?.setSelectionRange(c,c),P(c)})}if(a){const n=u?.messages??[],c=u?.activity??[],p=u?.createImproveRun??a.createImproveRun??null,W=Ee(n),L=W?.body??a.title,Ce=M.get(a.projectId)??null,I=a.status==="queued"||a.status==="running";return e.jsxs("section",{className:"cloud-work-view thread",children:[e.jsx("div",{className:"cloud-thread-body",children:e.jsxs("div",{className:"cloud-thread-timeline",children:[e.jsxs("div",{className:"cloud-thread-inline-nav",children:[e.jsxs("button",{type:"button",onClick:N,children:[e.jsx(ke,{size:15}),e.jsx("span",{children:"All tasks"})]}),e.jsx("span",{children:Ce?.name??"Cloud Project"}),a.sourceRef?e.jsx("span",{children:a.sourceRef}):null,w?e.jsx("button",{type:"button",onClick:w,children:e.jsx("span",{children:"Files"})}):null]}),L&&e.jsx("article",{className:"cloud-message user",children:e.jsx("p",{children:L})}),e.jsxs("div",{className:"cloud-worked-line",children:[e.jsx("span",{children:$e(a.status)}),e.jsx("span",{children:B(a.updatedAt)}),I&&e.jsxs("button",{type:"button",onClick:()=>{F()},disabled:o,children:[e.jsx(ee,{size:12}),e.jsx("span",{children:"Stop task"})]})]}),e.jsx(Fe,{workItem:a,detail:u,actionBusy:o,localProjectName:re,onApplyLocalPatch:de,onShowFiles:w}),p?e.jsx(Ue,{run:p,actionBusy:o,onApprove:()=>{q(null)},onEdit:ge,onCancel:()=>{ce()}}):null,n.filter(i=>i.id!==W?.id).filter(i=>!oe(i)).map(i=>e.jsx("article",{className:`cloud-message ${i.role}`,children:e.jsx("p",{children:i.body})},i.id)),c.map(i=>e.jsxs("article",{className:"cloud-activity",children:[e.jsx("span",{children:i.kind.replace(/_/g," ")}),e.jsx("p",{children:i.summary})]},i.id)),!x&&n.length===0&&c.length===0&&!L&&e.jsx("p",{className:"cloud-muted",children:"No messages yet."})]})}),e.jsxs("div",{className:"cloud-thread-composer",children:[e.jsx("button",{type:"button",className:`cloud-composer-plus ${U?"active":""}`,onClick:()=>Y(i=>!i),title:"Cloud task options",children:e.jsx(D,{size:18})}),U&&e.jsxs("div",{className:"cloud-composer-options thread-options",children:[e.jsxs("button",{type:"button",onClick:()=>{ve()},disabled:o,children:[e.jsx(Pe,{size:14}),e.jsx("span",{children:"Handle in background"})]}),I&&e.jsxs("button",{type:"button",onClick:()=>{F()},disabled:o,children:[e.jsx(ee,{size:14}),e.jsx("span",{children:"Stop task"})]})]}),e.jsx("textarea",{ref:T,value:b,rows:1,placeholder:"Request changes or ask a question",onChange:i=>{g(i.target.value),O(i.currentTarget)},onClick:i=>O(i.currentTarget),onSelect:i=>O(i.currentTarget),onKeyDown:i=>{i.key==="Enter"&&!i.shiftKey&&(i.preventDefault(),Q())}}),e.jsx(se,{buttonClassName:"cloud-composer-mic-button",connection:d,disabled:o,iconSize:17,wrapperClassName:"cloud-composer-mic",showToast:f,onTranscript:be}),e.jsx("button",{type:"button",className:"cloud-composer-submit",disabled:!b.trim()||o,onClick:()=>{Q()},title:"Send",children:e.jsx(ne,{size:17})})]})]})}return e.jsx("section",{className:"cloud-work-view home",children:e.jsxs("div",{className:"cloud-home-shell",children:[e.jsx("h1",{children:"What should we change next?"}),e.jsxs("div",{className:"cloud-home-composer",children:[e.jsx("textarea",{ref:K,value:y,rows:2,placeholder:"Describe a task",onChange:n=>{R(n.target.value),E(n.currentTarget)},onClick:n=>E(n.currentTarget),onSelect:n=>E(n.currentTarget),onKeyDown:n=>{n.key==="Enter"&&!n.shiftKey&&(n.preventDefault(),J())}}),e.jsxs("div",{className:"cloud-home-composer-actions",children:[e.jsx("button",{type:"button",className:`cloud-composer-plus ${X?"active":""}`,onClick:()=>_(n=>!n),title:"Cloud task options",children:e.jsx(D,{size:18})}),e.jsxs("div",{className:"cloud-composer-selects",children:[e.jsx(te,{compact:!0,className:"cloud-project-select",disabled:o||s.length===0,label:"Cloud Project",options:je,placement:"top",value:v,onChange:xe}),e.jsx(te,{compact:!0,className:"cloud-model-select",disabled:o,label:"Model",options:Se("openpond"),placement:"top",value:me,onChange:h})]}),e.jsx(se,{buttonClassName:"cloud-composer-mic-button",connection:d,disabled:o,iconSize:17,wrapperClassName:"cloud-composer-mic",showToast:f,onTranscript:fe}),e.jsx("button",{type:"button",className:"cloud-composer-submit",disabled:!y.trim()||!v||o,onClick:()=>{J()},title:"Handle in background",children:e.jsx(ne,{size:17})})]}),X&&e.jsxs("div",{className:"cloud-composer-options",children:[e.jsxs("button",{type:"button",onClick:()=>_(!1),disabled:o,children:[e.jsx(D,{size:14}),e.jsx("span",{children:"New task"})]}),e.jsxs("button",{type:"button",onClick:()=>k(v),disabled:!v||o,children:[e.jsx(Ae,{size:14}),e.jsx("span",{children:"Create environment"})]})]})]}),e.jsxs("div",{className:"cloud-task-list-toolbar",children:[e.jsxs("div",{className:"cloud-task-tabs",role:"tablist","aria-label":"Cloud tasks",children:[e.jsx("button",{type:"button",className:C==="tasks"?"active":"",onClick:()=>z("tasks"),children:"Tasks"}),e.jsx("button",{type:"button",className:C==="reviews"?"active":"",onClick:()=>z("reviews"),children:"Code reviews"}),e.jsx("button",{type:"button",className:C==="archive"?"active":"",onClick:()=>z("archive"),children:"Archive"})]}),e.jsxs("label",{className:"cloud-task-search",children:[e.jsx(we,{size:17}),e.jsx("input",{value:$,placeholder:"Search",onChange:n=>he(n.target.value)})]})]}),e.jsxs("div",{className:"cloud-task-list",children:[G.map(n=>e.jsxs("button",{type:"button",className:"cloud-task-row",onClick:()=>A(n),children:[e.jsx("span",{children:n.title}),e.jsxs("small",{children:[B(n.updatedAt)," · ",Me(M,n.projectId)]})]},n.id)),!x&&G.length===0&&e.jsx("p",{className:"cloud-empty",children:s.length?"No tasks yet":"Create or link a Cloud Project before starting a task"}),x&&e.jsx("p",{className:"cloud-empty",children:"Loading tasks..."})]})]})})}export{Je as CloudWorkView};
|
|
1
|
+
import{u as ye,r,a7 as Ne,j as e,V as ke,b as I,an as ee,k as D,bU as se,bV as ne,D as te,A as Se,bW as Ae,S as we,N as ie,Z as H,aB as Re,X as Te,bX as ae}from"./index-KoQSSt_f.js";import{P as Pe}from"./play-C-37dnR1.js";import{createPipelineAgentIdFromObjective as le,createPipelineSourceRootPathForAgent as _e}from"./create-pipeline-request-D6uLUxe9.js";function ze(s,t){return t==="archive"?!!s.archivedAt:t==="reviews"?s.status==="needs_review":!s.archivedAt}function $e(s){return s==="backlog"?"Task":s==="needs_review"?"Review":s.replace(/_/g," ")}function Me(s,t){const a=s.get(t);return a?.organizationName?`${a.organizationName} / ${a.name}`:a?.name??"Cloud Project"}function Ee(s){const t=s.filter(a=>!oe(a));return t.find(a=>a.role==="user")??t[0]??null}function oe(s){return s.metadata.source==="openpond_app_cloud_create_improve_link"||s.metadata.hidden===!0}function Oe(s){return s.adapter.kind==="local"?"Local profile":s.adapter.kind==="promote_local_to_hosted"?"Local to hosted":"Hosted profile"}function Le(s){return s?.plan?.checks?.length?s.plan.checks.map(t=>({name:t.name,command:t.command})):[{name:"inspect",command:"pnpm agent:inspect"},{name:"build",command:"pnpm build"},{name:"validate",command:"pnpm agent:validate"},{name:"eval",command:"pnpm agent:eval"}]}function De(s){return s?.plan?.requirements?.map(t=>({name:t.name,detail:[t.kind.replace(/_/g," "),t.status,t.detail].filter(Boolean).join(" / ")}))??[]}function He(s){const t=s?.workflowCapture;return t?[{name:"Actions",values:t.profileActions},{name:"Providers",values:t.externalProviders},{name:"Side effects",values:t.sideEffects},{name:"Files",values:t.files},{name:"Artifacts",values:t.outputArtifacts},{name:"Traces",values:t.traceRefs},{name:"Channels",values:t.channelTargets}].flatMap(({name:a,values:u})=>u.length?[{name:a,detail:u.join(", ")}]:[]):[]}function qe(s){if(s.plan?.sourcePlan?.length)return s.plan.sourcePlan;const t=s.operation==="improve"?"update":"create",a=s.target.kind==="agent"?s.target.id??le(s.objective):le(s.objective);return[{path:_e(a),operation:t,reason:s.objective},{path:"settings/profile.yaml",operation:"update",reason:"Expose the default chat action through the hosted profile catalog."}]}function Fe({workItem:s,detail:t,actionBusy:a,localProjectName:u,onApplyLocalPatch:x,onShowFiles:o}){const d=Ue(s,t),m=s.status==="needs_review"&&!!(u&&x);return e.jsxs("article",{className:"cloud-work-boundary-strip",children:[e.jsxs("div",{children:[e.jsx("span",{children:Ke(s)}),e.jsx("small",{children:Ve(s)})]}),e.jsx("div",{className:"cloud-work-boundary-chips",children:d.map(j=>e.jsx("span",{children:j},j))}),s.status==="needs_review"?e.jsxs("button",{type:"button",onClick:()=>{x&&x()},disabled:a||!m,title:m?`Apply to ${u}`:"Link this Cloud Project to a local checkout before applying locally.",children:[e.jsx(ie,{size:13}),e.jsx("span",{children:m?"Apply locally":"No local checkout"})]}):null,o?e.jsxs("button",{type:"button",onClick:o,children:[e.jsx(H,{size:13}),e.jsx("span",{children:"Files"})]}):null]})}function Ke(s){return s.status==="needs_review"?"Cloud patch ready":s.status==="queued"||s.status==="running"?"Running in Cloud":s.status==="failed"?"Cloud task failed":"Cloud task"}function Ve(s){return s.status==="needs_review"?"Review files and apply locally only when ready.":s.status==="queued"||s.status==="running"?"The local checkout is unchanged while the sandbox works.":s.status==="failed"?"Open files/logs to inspect the remote run before retrying.":"Cloud changes stay remote until an explicit apply or pull action."}function Ue(s,t){const a=[s.status.replace(/_/g," ")];return s.sourceRef&&a.push(s.sourceRef),s.latestSandboxId&&a.push("sandbox"),s.latestTaskRunId&&a.push("task run"),t?.activity.length&&a.push(`${t.activity.length} log${t.activity.length===1?"":"s"}`),s.status==="needs_review"&&a.push("patch only"),a.push("local unchanged"),a}function Xe({run:s,actionBusy:t,onApprove:a,onEdit:u,onCancel:x}){const o=s.state,d=s.plan,m=Le(s),j=De(s),f=He(s),N=qe(s),h=Re(d?.metadata),k=s.scope.targetProject?.name??s.scope.targetProject?.id??"Profile source",S=!!d&&o==="awaiting_plan_approval"&&(d?.status==="draft"||d?.status==="pending_approval"),A=(o==="planning"||o==="awaiting_plan_approval")&&(d?.status==="draft"||d?.status==="pending_approval");return e.jsxs("article",{className:"cloud-create-plan-review",children:[e.jsxs("div",{className:"cloud-create-plan-heading",children:[e.jsx(H,{size:16}),e.jsxs("div",{children:[e.jsx("span",{children:"Agent plan review"}),e.jsxs("small",{children:[s.operation," / ",Oe(s)," / ",o.replace(/_/g," ")]})]})]}),e.jsxs("div",{className:"cloud-create-plan-copy",children:[e.jsxs("section",{children:[e.jsx("span",{children:"Objective"}),e.jsx("p",{children:s.objective})]}),e.jsxs("section",{children:[e.jsx("span",{children:"Target"}),e.jsx("p",{children:k})]}),d?.capturedContextSummary?e.jsxs("section",{children:[e.jsx("span",{children:"Captured context"}),e.jsx("p",{children:d.capturedContextSummary})]}):s.context.targetRepoAssumptions.length?e.jsxs("section",{children:[e.jsx("span",{children:"Captured context"}),e.jsx("p",{children:s.context.targetRepoAssumptions.join("; ")})]}):null,s.context.attachments.length?e.jsxs("section",{children:[e.jsx("span",{children:"Inputs"}),e.jsx("p",{children:s.context.attachments.map(l=>l.name).join(", ")})]}):null,s.context.apps.length?e.jsxs("section",{children:[e.jsx("span",{children:"Apps"}),e.jsx("p",{children:s.context.apps.map(l=>l.name).join(", ")})]}):null,s.context.tools.length?e.jsxs("section",{children:[e.jsx("span",{children:"Tools"}),e.jsx("p",{children:s.context.tools.map(l=>l.name).join(", ")})]}):null,h?e.jsxs("section",{children:[e.jsx("span",{children:"Action shape"}),e.jsxs("p",{children:[h.label,": ",h.detail]})]}):null]}),e.jsxs("div",{className:"cloud-create-plan-grid",children:[h?e.jsxs("section",{children:[e.jsx("span",{children:"Actions"}),e.jsxs("ul",{children:[e.jsxs("li",{children:[e.jsx("code",{children:h.defaultActionKey??"chat"}),e.jsx("small",{children:h.label})]}),h.directActionHint?e.jsxs("li",{children:[e.jsx("code",{children:"direct action"}),e.jsx("small",{children:h.directActionHint})]}):null]})]}):null,e.jsxs("section",{children:[e.jsx("span",{children:"Source plan"}),e.jsx("ul",{children:N.map(l=>e.jsxs("li",{children:[e.jsx("code",{children:l.path}),e.jsx("small",{children:l.operation})]},`${l.operation}:${l.path}`))})]}),e.jsxs("section",{children:[e.jsx("span",{children:"Checks"}),e.jsx("ul",{children:m.map(l=>e.jsxs("li",{children:[e.jsx("code",{children:l.name}),e.jsx("small",{children:l.command})]},`${l.name}:${l.command}`))})]}),j.length?e.jsxs("section",{children:[e.jsx("span",{children:"Requirements"}),e.jsx("ul",{children:j.map(l=>e.jsxs("li",{children:[e.jsx("code",{children:l.name}),e.jsx("small",{children:l.detail})]},`${l.name}:${l.detail}`))})]}):null,f.length?e.jsxs("section",{children:[e.jsx("span",{children:"Workflow evidence"}),e.jsx("ul",{children:f.map(l=>e.jsxs("li",{children:[e.jsx("code",{children:l.name}),e.jsx("small",{children:l.detail})]},`${l.name}:${l.detail}`))})]}):null]}),e.jsxs("div",{className:"cloud-create-plan-actions",children:[e.jsxs("button",{type:"button",onClick:a,disabled:t||!S,children:[e.jsx(ie,{size:14}),e.jsx("span",{children:"Confirm plan"})]}),e.jsxs("button",{type:"button",onClick:u,disabled:t||!A,children:[e.jsx(H,{size:14}),e.jsx("span",{children:"Edit plan"})]}),e.jsxs("button",{type:"button",onClick:x,disabled:t,children:[e.jsx(Te,{size:14}),e.jsx("span",{children:"Cancel"})]})]})]})}function Qe({projects:s,workItems:t,selectedWorkItem:a,detail:u,loading:x,actionBusy:o,connection:d,error:m,model:j,showToast:f,onBack:N,onModelChange:h,onSetupCloudProject:k,onCreateWork:S,onSelectWorkItem:A,onSendMessage:l,onHandleBackground:q,onCancelCreatePlan:ce,onCancelTask:F,localProjectName:re,onApplyLocalPatch:de,onShowFiles:w}){ye(m);const[y,R]=r.useState(""),[b,g]=r.useState(""),K=r.useRef(null),T=r.useRef(null),[ue,V]=r.useState(0),[pe,P]=r.useState(0),[U,_]=r.useState(!1),[X,Z]=r.useState(!1),[C,z]=r.useState("tasks"),[$,he]=r.useState(""),[G,xe]=r.useState(()=>s[0]?.id??""),M=r.useMemo(()=>new Map(s.map(n=>[n.id,n])),[s]),v=M.has(G)?G:s[0]?.id??"",me=Ne("openpond",j),je=r.useMemo(()=>s.length?s.map(n=>({value:n.id,label:n.organizationName?`${n.organizationName} / ${n.name}`:n.name,shortLabel:n.name,description:n.sourceLabel??n.defaultBranch??void 0})):[{value:"",label:"No Cloud Project"}],[s]),J=r.useMemo(()=>{const n=$.trim().toLowerCase();return t.filter(c=>ze(c,C)?n?c.title.toLowerCase().includes(n):!0:!1)},[$,C,t]);async function Q(){const n=y.trim();!n||!v||o||(await S({projectId:v,prompt:n}),R(""),_(!1))}async function Y(){const n=b.trim();!n||o||(await l(n),g(""))}async function ve(){const n=b.trim();await q(n||null),g(""),Z(!1)}function E(n){V(n.selectionStart??n.value.length)}function O(n){P(n.selectionStart??n.value.length)}function fe(n){const c=K.current,p=ae(y,n,c?.selectionStart??ue);R(p.value),V(p.cursorIndex),window.requestAnimationFrame(()=>{c?.focus(),c?.setSelectionRange(p.cursorIndex,p.cursorIndex)})}function be(n){const c=T.current,p=ae(b,n,c?.selectionStart??pe);g(p.value),P(p.cursorIndex),window.requestAnimationFrame(()=>{c?.focus(),c?.setSelectionRange(p.cursorIndex,p.cursorIndex)})}function ge(){g(n=>n||"Revise plan: "),window.requestAnimationFrame(()=>{const n=T.current,c=n?.value.length??0;n?.focus(),n?.setSelectionRange(c,c),P(c)})}if(a){const n=u?.messages??[],c=u?.activity??[],p=u?.createImproveRun??a.createImproveRun??null,W=Ee(n),L=W?.body??a.title,Ce=M.get(a.projectId)??null,B=a.status==="queued"||a.status==="running";return e.jsxs("section",{className:"cloud-work-view thread",children:[e.jsx("div",{className:"cloud-thread-body",children:e.jsxs("div",{className:"cloud-thread-timeline",children:[e.jsxs("div",{className:"cloud-thread-inline-nav",children:[e.jsxs("button",{type:"button",onClick:N,children:[e.jsx(ke,{size:15}),e.jsx("span",{children:"All tasks"})]}),e.jsx("span",{children:Ce?.name??"Cloud Project"}),a.sourceRef?e.jsx("span",{children:a.sourceRef}):null,w?e.jsx("button",{type:"button",onClick:w,children:e.jsx("span",{children:"Files"})}):null]}),L&&e.jsx("article",{className:"cloud-message user",children:e.jsx("p",{children:L})}),e.jsxs("div",{className:"cloud-worked-line",children:[e.jsx("span",{children:$e(a.status)}),e.jsx("span",{children:I(a.updatedAt)}),B&&e.jsxs("button",{type:"button",onClick:()=>{F()},disabled:o,children:[e.jsx(ee,{size:12}),e.jsx("span",{children:"Stop task"})]})]}),e.jsx(Fe,{workItem:a,detail:u,actionBusy:o,localProjectName:re,onApplyLocalPatch:de,onShowFiles:w}),p?e.jsx(Xe,{run:p,actionBusy:o,onApprove:()=>{q(null)},onEdit:ge,onCancel:()=>{ce()}}):null,n.filter(i=>i.id!==W?.id).filter(i=>!oe(i)).map(i=>e.jsx("article",{className:`cloud-message ${i.role}`,children:e.jsx("p",{children:i.body})},i.id)),c.map(i=>e.jsxs("article",{className:"cloud-activity",children:[e.jsx("span",{children:i.kind.replace(/_/g," ")}),e.jsx("p",{children:i.summary})]},i.id)),!x&&n.length===0&&c.length===0&&!L&&e.jsx("p",{className:"cloud-muted",children:"No messages yet."})]})}),e.jsxs("div",{className:"cloud-thread-composer",children:[e.jsx("button",{type:"button",className:`cloud-composer-plus ${X?"active":""}`,onClick:()=>Z(i=>!i),title:"Cloud task options",children:e.jsx(D,{size:18})}),X&&e.jsxs("div",{className:"cloud-composer-options thread-options",children:[e.jsxs("button",{type:"button",onClick:()=>{ve()},disabled:o,children:[e.jsx(Pe,{size:14}),e.jsx("span",{children:"Handle in background"})]}),B&&e.jsxs("button",{type:"button",onClick:()=>{F()},disabled:o,children:[e.jsx(ee,{size:14}),e.jsx("span",{children:"Stop task"})]})]}),e.jsx("textarea",{ref:T,value:b,rows:1,placeholder:"Request changes or ask a question",onChange:i=>{g(i.target.value),O(i.currentTarget)},onClick:i=>O(i.currentTarget),onSelect:i=>O(i.currentTarget),onKeyDown:i=>{i.key==="Enter"&&!i.shiftKey&&(i.preventDefault(),Y())}}),e.jsx(se,{buttonClassName:"cloud-composer-mic-button",connection:d,disabled:o,iconSize:17,wrapperClassName:"cloud-composer-mic",showToast:f,onTranscript:be}),e.jsx("button",{type:"button",className:"cloud-composer-submit",disabled:!b.trim()||o,onClick:()=>{Y()},title:"Send",children:e.jsx(ne,{size:17})})]})]})}return e.jsx("section",{className:"cloud-work-view home",children:e.jsxs("div",{className:"cloud-home-shell",children:[e.jsx("h1",{children:"What should we change next?"}),e.jsxs("div",{className:"cloud-home-composer",children:[e.jsx("textarea",{ref:K,value:y,rows:2,placeholder:"Describe a task",onChange:n=>{R(n.target.value),E(n.currentTarget)},onClick:n=>E(n.currentTarget),onSelect:n=>E(n.currentTarget),onKeyDown:n=>{n.key==="Enter"&&!n.shiftKey&&(n.preventDefault(),Q())}}),e.jsxs("div",{className:"cloud-home-composer-actions",children:[e.jsx("button",{type:"button",className:`cloud-composer-plus ${U?"active":""}`,onClick:()=>_(n=>!n),title:"Cloud task options",children:e.jsx(D,{size:18})}),e.jsxs("div",{className:"cloud-composer-selects",children:[e.jsx(te,{compact:!0,className:"cloud-project-select",disabled:o||s.length===0,label:"Cloud Project",options:je,placement:"top",value:v,onChange:xe}),e.jsx(te,{compact:!0,className:"cloud-model-select",disabled:o,label:"Model",options:Se("openpond"),placement:"top",value:me,onChange:h})]}),e.jsx(se,{buttonClassName:"cloud-composer-mic-button",connection:d,disabled:o,iconSize:17,wrapperClassName:"cloud-composer-mic",showToast:f,onTranscript:fe}),e.jsx("button",{type:"button",className:"cloud-composer-submit",disabled:!y.trim()||!v||o,onClick:()=>{Q()},title:"Handle in background",children:e.jsx(ne,{size:17})})]}),U&&e.jsxs("div",{className:"cloud-composer-options",children:[e.jsxs("button",{type:"button",onClick:()=>_(!1),disabled:o,children:[e.jsx(D,{size:14}),e.jsx("span",{children:"New task"})]}),e.jsxs("button",{type:"button",onClick:()=>k(v),disabled:!v||o,children:[e.jsx(Ae,{size:14}),e.jsx("span",{children:"Create environment"})]})]})]}),e.jsxs("div",{className:"cloud-task-list-toolbar",children:[e.jsxs("div",{className:"cloud-task-tabs",role:"tablist","aria-label":"Cloud tasks",children:[e.jsx("button",{type:"button",className:C==="tasks"?"active":"",onClick:()=>z("tasks"),children:"Tasks"}),e.jsx("button",{type:"button",className:C==="reviews"?"active":"",onClick:()=>z("reviews"),children:"Code reviews"}),e.jsx("button",{type:"button",className:C==="archive"?"active":"",onClick:()=>z("archive"),children:"Archive"})]}),e.jsxs("label",{className:"cloud-task-search",children:[e.jsx(we,{size:17}),e.jsx("input",{value:$,placeholder:"Search",onChange:n=>he(n.target.value)})]})]}),e.jsxs("div",{className:"cloud-task-list",children:[J.map(n=>e.jsxs("button",{type:"button",className:"cloud-task-row",onClick:()=>A(n),children:[e.jsx("span",{children:n.title}),e.jsxs("small",{children:[I(n.updatedAt)," · ",Me(M,n.projectId)]})]},n.id)),!x&&J.length===0&&e.jsx("p",{className:"cloud-empty",children:s.length?"No tasks yet":"Create or link a Cloud Project before starting a task"}),x&&e.jsx("p",{className:"cloud-empty",children:"Loading tasks..."})]})]})})}export{Qe as CloudWorkView};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as j,j as e,S as g,a as b,i as x,C as k,F as C,P,B as v,M,b as S,c as w}from"./index-
|
|
1
|
+
import{r as j,j as e,S as g,a as b,i as x,C as k,F as C,P,B as v,M,b as S,c as w}from"./index-KoQSSt_f.js";function F({open:s,query:r,projects:n,sessions:o,onQueryChange:c,onClose:d,onNewChat:f,onOpenProject:u,onOpenSession:m}){const t=r.trim().toLowerCase(),l=j.useMemo(()=>L(o,t,10),[t,o]),i=j.useMemo(()=>z(n,t,8),[t,n]);if(!s)return null;const N=()=>{const a=i[0];if(a){u(a);return}const p=l[0];p&&m(p)};return e.jsx("div",{className:"command-overlay",role:"presentation",onMouseDown:d,children:e.jsxs("section",{className:"command-menu",role:"dialog","aria-modal":"true","aria-label":"Search chats and projects",onMouseDown:a=>a.stopPropagation(),children:[e.jsxs("div",{className:"command-input-row",children:[e.jsx(g,{size:17}),e.jsx("input",{autoFocus:!0,value:r,onChange:a=>c(a.target.value),onKeyDown:a=>{a.key==="Enter"&&(a.preventDefault(),N()),a.key==="Escape"&&(a.preventDefault(),d())},placeholder:"Search chats and projects"}),e.jsx("kbd",{children:"Esc"})]}),e.jsxs("div",{className:"command-results",children:[e.jsxs("button",{className:"command-result command-create",onClick:f,children:[e.jsx(b,{size:15}),e.jsx("span",{children:"New local task"}),e.jsx("small",{children:"General"})]}),e.jsxs(h,{label:"Projects",children:[i.map(a=>e.jsxs("button",{className:"command-result",onClick:()=>u(a),children:[x(a)?e.jsx(k,{size:15}):e.jsx(C,{size:15}),e.jsx("span",{children:a.project.name}),e.jsx("small",{children:D(a)})]},a.project.id)),i.length===0&&e.jsx("div",{className:"command-empty",children:"No projects found"})]}),e.jsxs(h,{label:"Chats",children:[l.map(a=>e.jsxs("button",{className:"command-result",onClick:()=>m(a),children:[a.pinned?e.jsx(P,{size:15}):a.savedForLater?e.jsx(v,{size:15}):e.jsx(M,{size:15}),e.jsx("span",{children:a.title}),e.jsx("small",{children:a.appName??S(a.updatedAt)})]},a.id)),l.length===0&&e.jsx("div",{className:"command-empty",children:"No chats found"})]})]})]})})}function L(s,r,n){const o=[];for(const c of s)if((!r||`${c.title} ${c.appName??""}`.toLowerCase().includes(r))&&(o.push(c),o.length>=n))break;return o}function z(s,r,n){const o=[];for(const c of s)if((!r||$(c).toLowerCase().includes(r))&&(o.push(c),o.length>=n))break;return o}function $(s){return w(s)?`${s.project.name} ${s.project.path} ${s.project.workspacePath}`:`${s.project.name} ${s.project.sourceLabel??""} ${s.project.organizationName??""}`}function D(s){return x(s)?s.project.organizationName??"Cloud Project":s.project.linkedOpenPondApp?"OpenPond project":s.project.source==="git"?"Local Git":"Local folder"}function h({label:s,children:r}){return e.jsxs("div",{className:"command-group",children:[e.jsx("div",{className:"command-group-label",children:s}),r]})}export{F as CommandMenu};
|