@shepai/cli 1.90.1 → 1.91.0-pr270.88e4d6c
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/dist/packages/core/src/application/ports/output/services/worktree-service.interface.d.ts +6 -0
- package/dist/packages/core/src/application/ports/output/services/worktree-service.interface.d.ts.map +1 -1
- package/dist/packages/core/src/application/use-cases/features/cleanup-feature-worktree.use-case.d.ts.map +1 -1
- package/dist/packages/core/src/application/use-cases/features/cleanup-feature-worktree.use-case.js +8 -0
- package/dist/packages/core/src/infrastructure/services/git/worktree.service.d.ts +1 -0
- package/dist/packages/core/src/infrastructure/services/git/worktree.service.d.ts.map +1 -1
- package/dist/packages/core/src/infrastructure/services/git/worktree.service.js +8 -0
- package/dist/packages/core/src/infrastructure/services/version.service.d.ts.map +1 -1
- package/dist/packages/core/src/infrastructure/services/version.service.js +1 -0
- package/dist/src/presentation/web/app/actions/get-feature-phase-timings.d.ts +1 -0
- package/dist/src/presentation/web/app/actions/get-feature-phase-timings.d.ts.map +1 -1
- package/dist/src/presentation/web/app/actions/get-feature-phase-timings.js +3 -0
- package/dist/src/presentation/web/app/api/attachments/preview/route.d.ts.map +1 -1
- package/dist/src/presentation/web/app/api/attachments/preview/route.js +47 -11
- package/dist/src/presentation/web/components/common/feature-drawer-tabs/activity-tab.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/feature-drawer-tabs/activity-tab.js +9 -6
- package/dist/src/presentation/web/components/common/feature-drawer-tabs/overview-tab.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/feature-drawer-tabs/overview-tab.js +2 -1
- package/dist/src/presentation/web/components/common/index.d.ts +1 -0
- package/dist/src/presentation/web/components/common/index.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/index.js +1 -0
- package/dist/src/presentation/web/components/common/inline-attachments/index.d.ts +3 -0
- package/dist/src/presentation/web/components/common/inline-attachments/index.d.ts.map +1 -0
- package/dist/src/presentation/web/components/common/inline-attachments/index.js +1 -0
- package/dist/src/presentation/web/components/common/inline-attachments/inline-attachments.d.ts +20 -0
- package/dist/src/presentation/web/components/common/inline-attachments/inline-attachments.d.ts.map +1 -0
- package/dist/src/presentation/web/components/common/inline-attachments/inline-attachments.js +72 -0
- package/dist/src/presentation/web/components/common/inline-attachments/inline-attachments.stories.d.ts +16 -0
- package/dist/src/presentation/web/components/common/inline-attachments/inline-attachments.stories.d.ts.map +1 -0
- package/dist/src/presentation/web/components/common/inline-attachments/inline-attachments.stories.js +46 -0
- package/dist/src/presentation/web/components/common/shep-logo/shep-logo.d.ts +2 -1
- package/dist/src/presentation/web/components/common/shep-logo/shep-logo.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/shep-logo/shep-logo.js +2 -2
- package/dist/src/presentation/web/components/common/shep-logo/shep-logo.stories.d.ts +1 -0
- package/dist/src/presentation/web/components/common/shep-logo/shep-logo.stories.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/shep-logo/shep-logo.stories.js +5 -0
- package/dist/src/presentation/web/components/common/version-badge/index.d.ts +3 -0
- package/dist/src/presentation/web/components/common/version-badge/index.d.ts.map +1 -0
- package/dist/src/presentation/web/components/common/version-badge/index.js +1 -0
- package/dist/src/presentation/web/components/common/version-badge/version-badge.d.ts +12 -0
- package/dist/src/presentation/web/components/common/version-badge/version-badge.d.ts.map +1 -0
- package/dist/src/presentation/web/components/common/version-badge/version-badge.js +22 -0
- package/dist/src/presentation/web/components/common/version-badge/version-badge.stories.d.ts +14 -0
- package/dist/src/presentation/web/components/common/version-badge/version-badge.stories.d.ts.map +1 -0
- package/dist/src/presentation/web/components/common/version-badge/version-badge.stories.js +50 -0
- package/dist/src/presentation/web/components/layouts/app-sidebar/app-sidebar.d.ts.map +1 -1
- package/dist/src/presentation/web/components/layouts/app-sidebar/app-sidebar.js +2 -1
- package/dist/src/presentation/web/lib/version.d.ts +2 -0
- package/dist/src/presentation/web/lib/version.d.ts.map +1 -1
- package/dist/src/presentation/web/lib/version.js +2 -0
- package/dist/src/presentation/web/next.config.d.ts.map +1 -1
- package/dist/src/presentation/web/next.config.js +12 -0
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/web/.next/BUILD_ID +1 -1
- package/web/.next/build-manifest.json +2 -2
- package/web/.next/fallback-build-manifest.json +2 -2
- package/web/.next/prerender-manifest.json +3 -3
- package/web/.next/required-server-files.js +4 -2
- package/web/.next/required-server-files.json +4 -2
- package/web/.next/server/app/(dashboard)/@drawer/create/page/server-reference-manifest.json +18 -18
- package/web/.next/server/app/(dashboard)/@drawer/create/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/create/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page/server-reference-manifest.json +21 -21
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page/server-reference-manifest.json +14 -14
- package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/create/page/server-reference-manifest.json +18 -18
- package/web/.next/server/app/(dashboard)/create/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/create/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/feature/[featureId]/page/server-reference-manifest.json +21 -21
- package/web/.next/server/app/(dashboard)/feature/[featureId]/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/feature/[featureId]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/page/server-reference-manifest.json +14 -14
- package/web/.next/server/app/(dashboard)/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page/server-reference-manifest.json +14 -14
- package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/_global-error.html +2 -2
- package/web/.next/server/app/_global-error.rsc +1 -1
- package/web/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/web/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/web/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/web/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/web/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/web/.next/server/app/_not-found/page/server-reference-manifest.json +1 -1
- package/web/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/api/attachments/preview/route.js.nft.json +1 -1
- package/web/.next/server/app/settings/page/server-reference-manifest.json +5 -5
- package/web/.next/server/app/settings/page.js.nft.json +1 -1
- package/web/.next/server/app/settings/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/skills/page/server-reference-manifest.json +6 -6
- package/web/.next/server/app/skills/page.js.nft.json +1 -1
- package/web/.next/server/app/skills/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/tools/page/server-reference-manifest.json +6 -6
- package/web/.next/server/app/tools/page.js.nft.json +1 -1
- package/web/.next/server/app/tools/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/version/page/server-reference-manifest.json +1 -1
- package/web/.next/server/app/version/page_client-reference-manifest.js +1 -1
- package/web/.next/server/chunks/[root-of-the-server]__0b10355c._.js +1 -1
- package/web/.next/server/chunks/[root-of-the-server]__0b10355c._.js.map +1 -1
- package/web/.next/server/chunks/ssr/744ca_web_components_common_control-center-drawer_create-drawer-client_tsx_5e26fc0a._.js +1 -1
- package/web/.next/server/chunks/ssr/744ca_web_components_common_control-center-drawer_create-drawer-client_tsx_5e26fc0a._.js.map +1 -1
- package/web/.next/server/chunks/ssr/7f428_lucide-react_dist_esm_icons_9027d30a._.js +1 -1
- package/web/.next/server/chunks/ssr/7f428_lucide-react_dist_esm_icons_9027d30a._.js.map +1 -1
- package/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_@drawer_repository_[repositoryId]_page_actions_da7eef33.js +1 -1
- package/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_@drawer_repository_[repositoryId]_page_actions_da7eef33.js.map +1 -1
- package/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_repository_[repositoryId]_page_actions_0a9251aa.js +1 -1
- package/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_repository_[repositoryId]_page_actions_0a9251aa.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__11033878._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__11033878._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__17143953._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__17143953._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__357d99f9._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__357d99f9._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__4be9a9bb._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__5d87af2e._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__9de266fa._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__9de266fa._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__aad040c0._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__aad040c0._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__b3a4cef4._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__b3a4cef4._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__c2173b6d._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__c2173b6d._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__f0d8d054._.js +2 -2
- package/web/.next/server/chunks/ssr/[root-of-the-server]__fdc75809._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__fdc75809._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_135edb9c._.js +1 -1
- package/web/.next/server/chunks/ssr/_135edb9c._.js.map +1 -1
- package/web/.next/server/chunks/ssr/{_2fa756cd._.js → _2159a67e._.js} +2 -2
- package/web/.next/server/chunks/ssr/{_2fa756cd._.js.map → _2159a67e._.js.map} +1 -1
- package/web/.next/server/chunks/ssr/_752e01fd._.js +1 -1
- package/web/.next/server/chunks/ssr/_752e01fd._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_8dacd1e7._.js +1 -1
- package/web/.next/server/chunks/ssr/_8dacd1e7._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_cc77a143._.js +1 -1
- package/web/.next/server/chunks/ssr/_cc77a143._.js.map +1 -1
- package/web/.next/server/chunks/ssr/b1a17_presentation_web_components_features_settings_settings-page-client_tsx_6ed9d5f8._.js +1 -1
- package/web/.next/server/chunks/ssr/b1a17_presentation_web_components_features_settings_settings-page-client_tsx_6ed9d5f8._.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_(dashboard)_page_actions_021a05f2.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_(dashboard)_page_actions_021a05f2.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_skills_page_actions_1fa8042e.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_skills_page_actions_1fa8042e.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_tools_page_actions_24684200.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_tools_page_actions_24684200.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_c4348b8a._.js +2 -2
- package/web/.next/server/chunks/ssr/src_presentation_web_c4348b8a._.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_components_bf50c527._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_components_bf50c527._.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_components_de814675._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_components_de814675._.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_components_e599bb8c._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_components_e599bb8c._.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_components_features_control-center_7ac3562e._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_components_features_control-center_7ac3562e._.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_e4510d10._.js +2 -2
- package/web/.next/server/chunks/ssr/src_presentation_web_e4510d10._.js.map +1 -1
- package/web/.next/server/pages/500.html +2 -2
- package/web/.next/server/server-reference-manifest.js +1 -1
- package/web/.next/server/server-reference-manifest.json +28 -28
- package/web/.next/static/chunks/{bb3e32c60cb2e794.js → 14378bfbee4a16b2.js} +1 -1
- package/web/.next/static/chunks/{0cbb35f940c9feef.js → 1a7ccf6213f5b086.js} +1 -1
- package/web/.next/static/chunks/{54de5c2f98832b92.js → 34f2d5bb3dbd4596.js} +1 -1
- package/web/.next/static/chunks/55e7ff9b53257d70.js +1 -0
- package/web/.next/static/chunks/59d10c26aa303a2f.js +1 -0
- package/web/.next/static/chunks/{38bb02c07a427f1e.js → 7bab6ba38016ca84.js} +1 -1
- package/web/.next/static/chunks/{4906aba274bc6920.js → 91efb6d9b7691cef.js} +1 -1
- package/web/.next/static/chunks/bfd817adffca36e9.js +1 -0
- package/web/.next/static/chunks/{7c7da9e978216d2b.js → e179c2973913aee6.js} +1 -1
- package/web/.next/static/chunks/{132ff681f7e12121.js → e5429ba99904f461.js} +1 -1
- package/web/.next/static/chunks/{c0f23bc23fd8b8ad.js → efc265e780061ee9.js} +1 -1
- package/web/.next/static/chunks/f6991b1fc4d88ca1.css +2 -0
- package/web/.next/static/chunks/{4354b4b30513e7f0.js → f8a5a8f7d47c7088.js} +1 -1
- package/web/.next/static/chunks/5c55da0e28e6cdc8.js +0 -1
- package/web/.next/static/chunks/7acc79e599df9890.js +0 -1
- package/web/.next/static/chunks/cb5c85c5e16e82d3.js +0 -1
- package/web/.next/static/chunks/f98eb6cb17b61cb2.css +0 -2
- /package/web/.next/static/{o8F4OKh6WJmRpbTqaCZ67 → RkTObxayKpI-H8n7ifCbx}/_buildManifest.js +0 -0
- /package/web/.next/static/{o8F4OKh6WJmRpbTqaCZ67 → RkTObxayKpI-H8n7ifCbx}/_clientMiddlewareManifest.json +0 -0
- /package/web/.next/static/{o8F4OKh6WJmRpbTqaCZ67 → RkTObxayKpI-H8n7ifCbx}/_ssgManifest.js +0 -0
package/dist/packages/core/src/application/ports/output/services/worktree-service.interface.d.ts
CHANGED
|
@@ -97,6 +97,12 @@ export interface IWorktreeService {
|
|
|
97
97
|
* @returns Computed worktree path (e.g., /repo/.worktrees/branch-name)
|
|
98
98
|
*/
|
|
99
99
|
getWorktreePath(repoPath: string, branch: string): string;
|
|
100
|
+
/**
|
|
101
|
+
* Prune stale worktree entries whose directories no longer exist.
|
|
102
|
+
*
|
|
103
|
+
* @param repoPath - Path to the git repository
|
|
104
|
+
*/
|
|
105
|
+
prune(repoPath: string): Promise<void>;
|
|
100
106
|
/**
|
|
101
107
|
* Ensure a directory is a valid git repository with at least one commit.
|
|
102
108
|
* If the directory is not a git repo, initializes it with `git init`
|
package/dist/packages/core/src/application/ports/output/services/worktree-service.interface.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"worktree-service.interface.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/core/src/application/ports/output/services/worktree-service.interface.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,8CAA8C;IAC9C,IAAI,EAAE,MAAM,CAAC;IACb,uBAAuB;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,4CAA4C;IAC5C,MAAM,EAAE,MAAM,CAAC;IACf,wCAAwC;IACxC,MAAM,EAAE,OAAO,CAAC;CACjB;AAED;;GAEG;AACH,oBAAY,iBAAiB;IAC3B,cAAc,mBAAmB;IACjC,aAAa,kBAAkB;IAC/B,SAAS,cAAc;IACvB,cAAc,mBAAmB;IACjC,SAAS,cAAc;CACxB;AAED;;GAEG;AACH,qBAAa,aAAc,SAAQ,KAAK;aAGpB,IAAI,EAAE,iBAAiB;aACvB,KAAK,CAAC,EAAE,KAAK;gBAF7B,OAAO,EAAE,MAAM,EACC,IAAI,EAAE,iBAAiB,EACvB,KAAK,CAAC,EAAE,KAAK,YAAA;CAKhC;AAED;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B;;;;;;;;;OASG;IACH,MAAM,CACJ,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,MAAM,EACd,YAAY,EAAE,MAAM,EACpB,UAAU,CAAC,EAAE,MAAM,GAClB,OAAO,CAAC,YAAY,CAAC,CAAC;IAEzB;;;;;;OAMG;IACH,MAAM,CAAC,YAAY,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAE7D;;;;;OAKG;IACH,IAAI,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,EAAE,CAAC,CAAC;IAEhD;;;;;;OAMG;IACH,MAAM,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAE3D;;;;;;OAMG;IACH,YAAY,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAEjE;;;;;;OAMG;IACH,kBAAkB,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAEvE;;;;;;OAMG;IACH,eAAe,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC;IAE1D;;;;;;;OAOG;IACH,mBAAmB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACtD"}
|
|
1
|
+
{"version":3,"file":"worktree-service.interface.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/core/src/application/ports/output/services/worktree-service.interface.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,8CAA8C;IAC9C,IAAI,EAAE,MAAM,CAAC;IACb,uBAAuB;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,4CAA4C;IAC5C,MAAM,EAAE,MAAM,CAAC;IACf,wCAAwC;IACxC,MAAM,EAAE,OAAO,CAAC;CACjB;AAED;;GAEG;AACH,oBAAY,iBAAiB;IAC3B,cAAc,mBAAmB;IACjC,aAAa,kBAAkB;IAC/B,SAAS,cAAc;IACvB,cAAc,mBAAmB;IACjC,SAAS,cAAc;CACxB;AAED;;GAEG;AACH,qBAAa,aAAc,SAAQ,KAAK;aAGpB,IAAI,EAAE,iBAAiB;aACvB,KAAK,CAAC,EAAE,KAAK;gBAF7B,OAAO,EAAE,MAAM,EACC,IAAI,EAAE,iBAAiB,EACvB,KAAK,CAAC,EAAE,KAAK,YAAA;CAKhC;AAED;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B;;;;;;;;;OASG;IACH,MAAM,CACJ,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,MAAM,EACd,YAAY,EAAE,MAAM,EACpB,UAAU,CAAC,EAAE,MAAM,GAClB,OAAO,CAAC,YAAY,CAAC,CAAC;IAEzB;;;;;;OAMG;IACH,MAAM,CAAC,YAAY,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAE7D;;;;;OAKG;IACH,IAAI,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,EAAE,CAAC,CAAC;IAEhD;;;;;;OAMG;IACH,MAAM,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAE3D;;;;;;OAMG;IACH,YAAY,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAEjE;;;;;;OAMG;IACH,kBAAkB,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAEvE;;;;;;OAMG;IACH,eAAe,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC;IAE1D;;;;OAIG;IACH,KAAK,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAEvC;;;;;;;OAOG;IACH,mBAAmB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACtD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cleanup-feature-worktree.use-case.d.ts","sourceRoot":"","sources":["../../../../../../../packages/core/src/application/use-cases/features/cleanup-feature-worktree.use-case.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAGH,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,iEAAiE,CAAC;AAC1G,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2DAA2D,CAAC;AAClG,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yDAAyD,CAAC;AAE7F,qBACa,6BAA6B;IAER,OAAO,CAAC,QAAQ,CAAC,WAAW;IAC9B,OAAO,CAAC,QAAQ,CAAC,eAAe;IACnC,OAAO,CAAC,QAAQ,CAAC,YAAY;gBAFP,WAAW,EAAE,kBAAkB,EACjC,eAAe,EAAE,gBAAgB,EACpC,YAAY,EAAE,aAAa;IAGjE,OAAO,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"cleanup-feature-worktree.use-case.d.ts","sourceRoot":"","sources":["../../../../../../../packages/core/src/application/use-cases/features/cleanup-feature-worktree.use-case.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAGH,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,iEAAiE,CAAC;AAC1G,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2DAA2D,CAAC;AAClG,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yDAAyD,CAAC;AAE7F,qBACa,6BAA6B;IAER,OAAO,CAAC,QAAQ,CAAC,WAAW;IAC9B,OAAO,CAAC,QAAQ,CAAC,eAAe;IACnC,OAAO,CAAC,QAAQ,CAAC,YAAY;gBAFP,WAAW,EAAE,kBAAkB,EACjC,eAAe,EAAE,gBAAgB,EACpC,YAAY,EAAE,aAAa;IAGjE,OAAO,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CA4ChD"}
|
package/dist/packages/core/src/application/use-cases/features/cleanup-feature-worktree.use-case.js
CHANGED
|
@@ -44,6 +44,14 @@ let CleanupFeatureWorktreeUseCase = class CleanupFeatureWorktreeUseCase {
|
|
|
44
44
|
catch (err) {
|
|
45
45
|
// eslint-disable-next-line no-console
|
|
46
46
|
console.warn('[CleanupFeatureWorktreeUseCase] worktree remove failed:', err);
|
|
47
|
+
// Prune stale worktree entries so the branch is no longer considered "in use"
|
|
48
|
+
try {
|
|
49
|
+
await this.worktreeService.prune(feature.repositoryPath);
|
|
50
|
+
}
|
|
51
|
+
catch (pruneErr) {
|
|
52
|
+
// eslint-disable-next-line no-console
|
|
53
|
+
console.warn('[CleanupFeatureWorktreeUseCase] worktree prune failed:', pruneErr);
|
|
54
|
+
}
|
|
47
55
|
}
|
|
48
56
|
// Step 2: Delete the local feature branch
|
|
49
57
|
try {
|
|
@@ -19,6 +19,7 @@ export declare class WorktreeService implements IWorktreeService {
|
|
|
19
19
|
constructor(execFile: ExecFunction);
|
|
20
20
|
create(repoPath: string, branch: string, worktreePath: string, startPoint?: string): Promise<WorktreeInfo>;
|
|
21
21
|
remove(worktreePath: string, force?: boolean): Promise<void>;
|
|
22
|
+
prune(repoPath: string): Promise<void>;
|
|
22
23
|
list(repoPath: string): Promise<WorktreeInfo[]>;
|
|
23
24
|
exists(repoPath: string, branch: string): Promise<boolean>;
|
|
24
25
|
branchExists(repoPath: string, branch: string): Promise<boolean>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"worktree.service.d.ts","sourceRoot":"","sources":["../../../../../../../packages/core/src/infrastructure/services/git/worktree.service.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AASH,OAAO,KAAK,EACV,gBAAgB,EAChB,YAAY,EACb,MAAM,0EAA0E,CAAC;AAOlF;;;GAGG;AACH,MAAM,MAAM,YAAY,GAAG,CACzB,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,EAAE,EACd,OAAO,CAAC,EAAE,MAAM,KACb,OAAO,CAAC;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC,CAAC;AAEjD,qBACa,eAAgB,YAAW,gBAAgB;IAClB,OAAO,CAAC,QAAQ,CAAC,QAAQ;gBAAR,QAAQ,EAAE,YAAY;IAErE,MAAM,CACV,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,MAAM,EACd,YAAY,EAAE,MAAM,EACpB,UAAU,CAAC,EAAE,MAAM,GAClB,OAAO,CAAC,YAAY,CAAC;IAqBlB,MAAM,CAAC,YAAY,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC;IAW5D,IAAI,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,EAAE,CAAC;IAO/C,MAAM,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAK1D,YAAY,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAWhE,kBAAkB,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAWtE,mBAAmB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAmC1D,eAAe,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM;IAMzD,OAAO,CAAC,mBAAmB;IA2B3B,OAAO,CAAC,aAAa;IAgCrB,OAAO,CAAC,kBAAkB;IAI1B,OAAO,CAAC,qBAAqB;CAU9B"}
|
|
1
|
+
{"version":3,"file":"worktree.service.d.ts","sourceRoot":"","sources":["../../../../../../../packages/core/src/infrastructure/services/git/worktree.service.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AASH,OAAO,KAAK,EACV,gBAAgB,EAChB,YAAY,EACb,MAAM,0EAA0E,CAAC;AAOlF;;;GAGG;AACH,MAAM,MAAM,YAAY,GAAG,CACzB,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,EAAE,EACd,OAAO,CAAC,EAAE,MAAM,KACb,OAAO,CAAC;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC,CAAC;AAEjD,qBACa,eAAgB,YAAW,gBAAgB;IAClB,OAAO,CAAC,QAAQ,CAAC,QAAQ;gBAAR,QAAQ,EAAE,YAAY;IAErE,MAAM,CACV,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,MAAM,EACd,YAAY,EAAE,MAAM,EACpB,UAAU,CAAC,EAAE,MAAM,GAClB,OAAO,CAAC,YAAY,CAAC;IAqBlB,MAAM,CAAC,YAAY,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC;IAW5D,KAAK,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAQtC,IAAI,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,EAAE,CAAC;IAO/C,MAAM,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAK1D,YAAY,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAWhE,kBAAkB,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAWtE,mBAAmB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAmC1D,eAAe,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM;IAMzD,OAAO,CAAC,mBAAmB;IA2B3B,OAAO,CAAC,aAAa;IAgCrB,OAAO,CAAC,kBAAkB;IAI1B,OAAO,CAAC,qBAAqB;CAU9B"}
|
|
@@ -60,6 +60,14 @@ let WorktreeService = class WorktreeService {
|
|
|
60
60
|
throw this.parseGitError(error);
|
|
61
61
|
}
|
|
62
62
|
}
|
|
63
|
+
async prune(repoPath) {
|
|
64
|
+
try {
|
|
65
|
+
await this.execFile('git', ['worktree', 'prune'], { cwd: repoPath });
|
|
66
|
+
}
|
|
67
|
+
catch (error) {
|
|
68
|
+
throw this.parseGitError(error);
|
|
69
|
+
}
|
|
70
|
+
}
|
|
63
71
|
async list(repoPath) {
|
|
64
72
|
const { stdout } = await this.execFile('git', ['worktree', 'list', '--porcelain'], {
|
|
65
73
|
cwd: repoPath,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.service.d.ts","sourceRoot":"","sources":["../../../../../../packages/core/src/infrastructure/services/version.service.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AASH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,4CAA4C,CAAC;AAG9E,YAAY,EAAE,WAAW,EAAE,MAAM,4CAA4C,CAAC;AAsC9E;;GAEG;AACH,qBACa,cAAc;IACzB,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAc;;IAM1C,OAAO,CAAC,eAAe;IAqCvB;;OAEG;IACH,UAAU,IAAI,WAAW;CAG1B;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,WAAW,GAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"version.service.d.ts","sourceRoot":"","sources":["../../../../../../packages/core/src/infrastructure/services/version.service.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AASH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,4CAA4C,CAAC;AAG9E,YAAY,EAAE,WAAW,EAAE,MAAM,4CAA4C,CAAC;AAsC9E;;GAEG;AACH,qBACa,cAAc;IACzB,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAc;;IAM1C,OAAO,CAAC,eAAe;IAqCvB;;OAEG;IACH,UAAU,IAAI,WAAW;CAG1B;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,WAAW,GAAG,IAAI,CAKzD"}
|
|
@@ -111,4 +111,5 @@ export function setVersionEnvVars(info) {
|
|
|
111
111
|
process.env.NEXT_PUBLIC_SHEP_VERSION = info.version;
|
|
112
112
|
process.env.NEXT_PUBLIC_SHEP_PACKAGE_NAME = info.name;
|
|
113
113
|
process.env.NEXT_PUBLIC_SHEP_DESCRIPTION = info.description;
|
|
114
|
+
// Branch is intentionally not set in production mode — only dev mode shows it
|
|
114
115
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-feature-phase-timings.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/web/app/actions/get-feature-phase-timings.ts"],"names":[],"mappings":"AAMA,MAAM,WAAW,eAAe;IAC9B,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,MAAM,WAAW,qBAAqB;IACpC,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"get-feature-phase-timings.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/web/app/actions/get-feature-phase-timings.ts"],"names":[],"mappings":"AAMA,MAAM,WAAW,eAAe;IAC9B,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,MAAM,WAAW,qBAAqB;IACpC,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;CACxB;AAED,KAAK,qBAAqB,GACtB;IAAE,OAAO,EAAE,eAAe,EAAE,CAAC;IAAC,iBAAiB,EAAE,qBAAqB,EAAE,CAAA;CAAE,GAC1E;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC;AAEtB,wBAAsB,sBAAsB,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,qBAAqB,CAAC,CA2B9F"}
|
|
@@ -42,6 +42,9 @@ async function readRejectionFeedback(featureId) {
|
|
|
42
42
|
iteration: Number(entry.iteration ?? 1),
|
|
43
43
|
message: String(entry.message ?? ''),
|
|
44
44
|
phase: entry.phase ? String(entry.phase) : undefined,
|
|
45
|
+
attachments: Array.isArray(entry.attachments)
|
|
46
|
+
? entry.attachments.map(String)
|
|
47
|
+
: undefined,
|
|
45
48
|
}));
|
|
46
49
|
}
|
|
47
50
|
catch {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"route.d.ts","sourceRoot":"","sources":["../../../../../../../../src/presentation/web/app/api/attachments/preview/route.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"route.d.ts","sourceRoot":"","sources":["../../../../../../../../src/presentation/web/app/api/attachments/preview/route.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AA8D3C,wBAAsB,GAAG,CAAC,OAAO,EAAE,WAAW,GAAG,OAAO,CAAC,YAAY,CAAC,CA0BrE"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { NextResponse } from 'next/server';
|
|
2
|
-
import { readFile, stat } from 'fs/promises';
|
|
3
|
-
import { extname, resolve } from 'path';
|
|
2
|
+
import { readFile, stat, readdir } from 'fs/promises';
|
|
3
|
+
import { basename, extname, join, resolve } from 'path';
|
|
4
4
|
import { getShepHomeDir } from '../../../../../../../packages/core/src/infrastructure/services/filesystem/shep-directory.service.js';
|
|
5
5
|
const MIME_MAP = {
|
|
6
6
|
'.png': 'image/png',
|
|
@@ -18,6 +18,44 @@ const MIME_MAP = {
|
|
|
18
18
|
'.yaml': 'text/yaml',
|
|
19
19
|
'.yml': 'text/yaml',
|
|
20
20
|
};
|
|
21
|
+
/**
|
|
22
|
+
* When the exact path doesn't exist (e.g. pending-<id> was renamed to <slug>),
|
|
23
|
+
* search all sibling attachment directories for the same filename.
|
|
24
|
+
*/
|
|
25
|
+
async function findAttachmentFallback(requestedPath, attachmentsRoot) {
|
|
26
|
+
const filename = basename(requestedPath);
|
|
27
|
+
try {
|
|
28
|
+
const dirs = await readdir(attachmentsRoot, { withFileTypes: true });
|
|
29
|
+
for (const entry of dirs) {
|
|
30
|
+
if (!entry.isDirectory())
|
|
31
|
+
continue;
|
|
32
|
+
const candidate = join(attachmentsRoot, entry.name, filename);
|
|
33
|
+
try {
|
|
34
|
+
await stat(candidate);
|
|
35
|
+
return candidate;
|
|
36
|
+
}
|
|
37
|
+
catch {
|
|
38
|
+
// not in this directory
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
catch {
|
|
43
|
+
// attachments root doesn't exist
|
|
44
|
+
}
|
|
45
|
+
return null;
|
|
46
|
+
}
|
|
47
|
+
function serveFile(filePath, mimeTypeHint) {
|
|
48
|
+
return readFile(filePath).then((buffer) => {
|
|
49
|
+
const ext = extname(filePath).toLowerCase();
|
|
50
|
+
const contentType = MIME_MAP[ext] ?? mimeTypeHint ?? 'application/octet-stream';
|
|
51
|
+
return new NextResponse(buffer, {
|
|
52
|
+
headers: {
|
|
53
|
+
'Content-Type': contentType,
|
|
54
|
+
'Cache-Control': 'private, max-age=3600',
|
|
55
|
+
},
|
|
56
|
+
});
|
|
57
|
+
});
|
|
58
|
+
}
|
|
21
59
|
export async function GET(request) {
|
|
22
60
|
const path = request.nextUrl.searchParams.get('path');
|
|
23
61
|
const mimeTypeHint = request.nextUrl.searchParams.get('mimeType');
|
|
@@ -31,17 +69,15 @@ export async function GET(request) {
|
|
|
31
69
|
}
|
|
32
70
|
try {
|
|
33
71
|
await stat(path);
|
|
34
|
-
|
|
35
|
-
const ext = extname(path).toLowerCase();
|
|
36
|
-
const contentType = MIME_MAP[ext] ?? mimeTypeHint ?? 'application/octet-stream';
|
|
37
|
-
return new NextResponse(buffer, {
|
|
38
|
-
headers: {
|
|
39
|
-
'Content-Type': contentType,
|
|
40
|
-
'Cache-Control': 'private, max-age=3600',
|
|
41
|
-
},
|
|
42
|
-
});
|
|
72
|
+
return await serveFile(path, mimeTypeHint);
|
|
43
73
|
}
|
|
44
74
|
catch {
|
|
75
|
+
// File not found at exact path — try fallback search
|
|
76
|
+
// This handles the case where pending-<sessionId>/ was renamed to <featureSlug>/
|
|
77
|
+
const fallbackPath = await findAttachmentFallback(path, attachmentsRoot);
|
|
78
|
+
if (fallbackPath) {
|
|
79
|
+
return await serveFile(fallbackPath, mimeTypeHint);
|
|
80
|
+
}
|
|
45
81
|
return NextResponse.json({ error: 'File not found' }, { status: 404 });
|
|
46
82
|
}
|
|
47
83
|
}
|
package/dist/src/presentation/web/components/common/feature-drawer-tabs/activity-tab.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"activity-tab.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/common/feature-drawer-tabs/activity-tab.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,eAAe,EACf,qBAAqB,EACtB,MAAM,yCAAyC,CAAC;
|
|
1
|
+
{"version":3,"file":"activity-tab.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/common/feature-drawer-tabs/activity-tab.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,eAAe,EACf,qBAAqB,EACtB,MAAM,yCAAyC,CAAC;AAGjD,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,eAAe,EAAE,GAAG,IAAI,CAAC;IAClC,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,iBAAiB,CAAC,EAAE,qBAAqB,EAAE,CAAC;CAC7C;AA4ED,wBAAgB,WAAW,CAAC,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,iBAAiB,EAAE,EAAE,gBAAgB,2CA8D3F"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
3
|
import { Loader2, AlertCircle, Clock } from 'lucide-react';
|
|
4
|
+
import { InlineAttachments } from '../../common/inline-attachments/index.js';
|
|
4
5
|
const NODE_TO_PHASE = {
|
|
5
6
|
analyze: 'Analyzing',
|
|
6
7
|
requirements: 'Requirements',
|
|
@@ -38,7 +39,7 @@ function groupTimingsByRun(timings) {
|
|
|
38
39
|
return groups;
|
|
39
40
|
}
|
|
40
41
|
/**
|
|
41
|
-
* Map each run:rejected timing entry to its rejection feedback message.
|
|
42
|
+
* Map each run:rejected timing entry to its rejection feedback message and attachments.
|
|
42
43
|
* Matches by sequential order: 1st rejected event → 1st feedback entry, etc.
|
|
43
44
|
*/
|
|
44
45
|
function buildRejectionMessageMap(timings, feedback) {
|
|
@@ -49,7 +50,8 @@ function buildRejectionMessageMap(timings, feedback) {
|
|
|
49
50
|
for (const t of timings) {
|
|
50
51
|
if (t.phase === 'run:rejected' && rejectionIdx < feedback.length) {
|
|
51
52
|
const key = `${t.agentRunId}-${t.phase}-${t.startedAt}`;
|
|
52
|
-
|
|
53
|
+
const entry = feedback[rejectionIdx];
|
|
54
|
+
map.set(key, { message: entry.message, attachments: entry.attachments });
|
|
53
55
|
rejectionIdx++;
|
|
54
56
|
}
|
|
55
57
|
}
|
|
@@ -79,17 +81,18 @@ function RunGroup({ group, groupIdx, multiRun, maxDurationMs, rejectionMessages,
|
|
|
79
81
|
return (_jsxs("div", { className: "flex flex-col gap-1.5", children: [multiRun ? (_jsxs("div", { className: "text-muted-foreground text-xs font-medium", children: ["Run #", groupIdx + 1] })) : null, group.timings.map((t) => {
|
|
80
82
|
if (isLifecycleEvent(t.phase)) {
|
|
81
83
|
const key = `${t.agentRunId}-${t.phase}-${t.startedAt}`;
|
|
82
|
-
const
|
|
83
|
-
return _jsx(LifecycleEventRow, { timing: t, message: message }, key);
|
|
84
|
+
const rejection = t.phase === 'run:rejected' ? rejectionMessages.get(key) : undefined;
|
|
85
|
+
return (_jsx(LifecycleEventRow, { timing: t, message: rejection?.message, attachments: rejection?.attachments }, key));
|
|
84
86
|
}
|
|
85
87
|
return (_jsx(NodeTimingRow, { timing: t, maxDurationMs: maxDurationMs }, `${t.agentRunId}-${t.phase}-${t.startedAt}`));
|
|
86
88
|
})] }));
|
|
87
89
|
}
|
|
88
|
-
function LifecycleEventRow({ timing, message }) {
|
|
90
|
+
function LifecycleEventRow({ timing, message, attachments, }) {
|
|
89
91
|
const event = LIFECYCLE_EVENTS[timing.phase];
|
|
90
92
|
if (!event)
|
|
91
93
|
return null;
|
|
92
|
-
|
|
94
|
+
const hasAttachments = attachments && attachments.length > 0;
|
|
95
|
+
return (_jsxs("div", { className: `text-xs ${event.colorClass}`, children: [_jsx("span", { children: event.label }), message ? (_jsxs("span", { "data-testid": "rejection-feedback-text", className: "text-muted-foreground ml-2 font-normal italic", children: ["\u2014 ", message] })) : null, hasAttachments ? (_jsx("div", { "data-testid": "rejection-feedback-attachments", className: "mt-1.5 ml-2", children: _jsx(InlineAttachments, { text: "", attachmentPaths: attachments }) })) : null] }));
|
|
93
96
|
}
|
|
94
97
|
function NodeTimingRow({ timing, maxDurationMs, }) {
|
|
95
98
|
const label = timing.phase.includes(':')
|
package/dist/src/presentation/web/components/common/feature-drawer-tabs/overview-tab.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"overview-tab.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/common/feature-drawer-tabs/overview-tab.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"overview-tab.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/common/feature-drawer-tabs/overview-tab.tsx"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AAMxE,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,eAAe,CAAC;CACvB;AAED,wBAAgB,WAAW,CAAC,EAAE,IAAI,EAAE,EAAE,gBAAgB,2CAwCrD"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
3
|
import { ExternalLink, GitBranch, GitCommitHorizontal, Zap } from 'lucide-react';
|
|
4
|
+
import { InlineAttachments } from '../../common/inline-attachments/index.js';
|
|
4
5
|
import { PrStatus } from '../../../../../../packages/core/src/domain/generated/output.js';
|
|
5
6
|
import { cn } from '../../../lib/utils.js';
|
|
6
7
|
import { Badge } from '../../ui/badge.js';
|
|
@@ -50,7 +51,7 @@ function FeatureInfo({ data }) {
|
|
|
50
51
|
Boolean(data.createdAt);
|
|
51
52
|
if (!hasInfo)
|
|
52
53
|
return null;
|
|
53
|
-
return (_jsxs(_Fragment, { children: [_jsx(Separator, {}), _jsxs("div", { "data-testid": "feature-drawer-info", className: "flex flex-col gap-3 p-4", children: [data.branch ? (_jsxs("div", { className: "flex flex-col gap-0.5", children: [_jsx("span", { className: "text-muted-foreground text-xs font-medium", children: "Branch" }), _jsxs("span", { className: "flex items-center gap-1.5 text-sm", children: [_jsx(GitBranch, { className: "text-muted-foreground h-3.5 w-3.5 shrink-0" }), _jsx("code", { className: "bg-muted rounded px-1 py-0.5 font-mono text-xs", children: data.branch }), data.baseBranch ? (_jsxs("span", { className: "text-muted-foreground text-xs", children: ["from ", data.baseBranch] })) : null] })] })) : null, data.oneLiner ? (_jsxs("div", { className: "flex flex-col gap-0.5", children: [_jsx("span", { className: "text-muted-foreground text-xs font-medium", children: "One-Liner" }), _jsx("span", { className: "text-sm leading-relaxed", children: data.oneLiner })] })) : null, data.userQuery ? (_jsxs("div", { className: "flex flex-col gap-0.5", children: [_jsx("span", { className: "text-muted-foreground text-xs font-medium", children: "User Query" }), _jsx(
|
|
54
|
+
return (_jsxs(_Fragment, { children: [_jsx(Separator, {}), _jsxs("div", { "data-testid": "feature-drawer-info", className: "flex flex-col gap-3 p-4", children: [data.branch ? (_jsxs("div", { className: "flex flex-col gap-0.5", children: [_jsx("span", { className: "text-muted-foreground text-xs font-medium", children: "Branch" }), _jsxs("span", { className: "flex items-center gap-1.5 text-sm", children: [_jsx(GitBranch, { className: "text-muted-foreground h-3.5 w-3.5 shrink-0" }), _jsx("code", { className: "bg-muted rounded px-1 py-0.5 font-mono text-xs", children: data.branch }), data.baseBranch ? (_jsxs("span", { className: "text-muted-foreground text-xs", children: ["from ", data.baseBranch] })) : null] })] })) : null, data.oneLiner ? (_jsxs("div", { className: "flex flex-col gap-0.5", children: [_jsx("span", { className: "text-muted-foreground text-xs font-medium", children: "One-Liner" }), _jsx("span", { className: "text-sm leading-relaxed", children: data.oneLiner })] })) : null, data.userQuery ? (_jsxs("div", { className: "flex flex-col gap-0.5", children: [_jsx("span", { className: "text-muted-foreground text-xs font-medium", children: "User Query" }), _jsx(InlineAttachments, { text: data.userQuery })] })) : null, data.summary ? (_jsxs("div", { className: "flex flex-col gap-0.5", children: [_jsx("span", { className: "text-muted-foreground text-xs font-medium", children: "Summary" }), _jsx("span", { className: "text-sm leading-relaxed", children: data.summary })] })) : null, data.createdAt ? (_jsx(DetailRow, { label: "Created", value: formatRelativeTime(data.createdAt) })) : null] })] }));
|
|
54
55
|
}
|
|
55
56
|
// ── PR Info section ──────────────────────────────────────────────────
|
|
56
57
|
const prStatusStyles = {
|
|
@@ -18,4 +18,5 @@ export { SidebarCollapseToggle, type SidebarCollapseToggleProps } from './sideba
|
|
|
18
18
|
export { SidebarNavItem, type SidebarNavItemProps } from './sidebar-nav-item/index.js';
|
|
19
19
|
export { SidebarSectionHeader, type SidebarSectionHeaderProps } from './sidebar-section-header/index.js';
|
|
20
20
|
export { ThemeToggle } from './theme-toggle/index.js';
|
|
21
|
+
export { VersionBadge, type VersionBadgeProps } from './version-badge/index.js';
|
|
21
22
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/web/components/common/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,KAAK,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAC7E,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC5D,OAAO,EAAE,UAAU,EAAE,KAAK,eAAe,EAAE,MAAM,eAAe,CAAC;AACjE,OAAO,EACL,mBAAmB,EACnB,KAAK,wBAAwB,EAC7B,KAAK,oBAAoB,GAC1B,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,iBAAiB,EACjB,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,GACzB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,eAAe,EAAE,KAAK,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AACjF,OAAO,EACL,WAAW,EACX,sBAAsB,EACtB,KAAK,gBAAgB,EACrB,KAAK,qBAAqB,EAC1B,KAAK,eAAe,EACpB,KAAK,eAAe,EACpB,KAAK,sBAAsB,GAC5B,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,mBAAmB,EAAE,KAAK,wBAAwB,EAAE,MAAM,yBAAyB,CAAC;AAC7F,OAAO,EAAE,kBAAkB,EAAE,KAAK,uBAAuB,EAAE,MAAM,wBAAwB,CAAC;AAC1F,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EACL,cAAc,EACd,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,GACxB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EACL,gBAAgB,EAChB,KAAK,qBAAqB,EAC1B,KAAK,WAAW,EAChB,KAAK,cAAc,EACnB,KAAK,SAAS,EACd,KAAK,oBAAoB,GAC1B,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,QAAQ,EAAE,KAAK,aAAa,EAAE,MAAM,aAAa,CAAC;AAC3D,OAAO,EACL,mBAAmB,EACnB,KAAK,wBAAwB,EAC7B,KAAK,uBAAuB,GAC7B,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,qBAAqB,EAAE,KAAK,0BAA0B,EAAE,MAAM,2BAA2B,CAAC;AACnG,OAAO,EAAE,cAAc,EAAE,KAAK,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAC9E,OAAO,EAAE,oBAAoB,EAAE,KAAK,yBAAyB,EAAE,MAAM,0BAA0B,CAAC;AAChG,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/web/components/common/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,KAAK,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAC7E,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC5D,OAAO,EAAE,UAAU,EAAE,KAAK,eAAe,EAAE,MAAM,eAAe,CAAC;AACjE,OAAO,EACL,mBAAmB,EACnB,KAAK,wBAAwB,EAC7B,KAAK,oBAAoB,GAC1B,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,iBAAiB,EACjB,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,GACzB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,eAAe,EAAE,KAAK,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AACjF,OAAO,EACL,WAAW,EACX,sBAAsB,EACtB,KAAK,gBAAgB,EACrB,KAAK,qBAAqB,EAC1B,KAAK,eAAe,EACpB,KAAK,eAAe,EACpB,KAAK,sBAAsB,GAC5B,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,mBAAmB,EAAE,KAAK,wBAAwB,EAAE,MAAM,yBAAyB,CAAC;AAC7F,OAAO,EAAE,kBAAkB,EAAE,KAAK,uBAAuB,EAAE,MAAM,wBAAwB,CAAC;AAC1F,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EACL,cAAc,EACd,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,GACxB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EACL,gBAAgB,EAChB,KAAK,qBAAqB,EAC1B,KAAK,WAAW,EAChB,KAAK,cAAc,EACnB,KAAK,SAAS,EACd,KAAK,oBAAoB,GAC1B,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,QAAQ,EAAE,KAAK,aAAa,EAAE,MAAM,aAAa,CAAC;AAC3D,OAAO,EACL,mBAAmB,EACnB,KAAK,wBAAwB,EAC7B,KAAK,uBAAuB,GAC7B,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,qBAAqB,EAAE,KAAK,0BAA0B,EAAE,MAAM,2BAA2B,CAAC;AACnG,OAAO,EAAE,cAAc,EAAE,KAAK,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAC9E,OAAO,EAAE,oBAAoB,EAAE,KAAK,yBAAyB,EAAE,MAAM,0BAA0B,CAAC;AAChG,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,YAAY,EAAE,KAAK,iBAAiB,EAAE,MAAM,iBAAiB,CAAC"}
|
|
@@ -18,3 +18,4 @@ export { SidebarCollapseToggle } from './sidebar-collapse-toggle/index.js';
|
|
|
18
18
|
export { SidebarNavItem } from './sidebar-nav-item/index.js';
|
|
19
19
|
export { SidebarSectionHeader } from './sidebar-section-header/index.js';
|
|
20
20
|
export { ThemeToggle } from './theme-toggle/index.js';
|
|
21
|
+
export { VersionBadge } from './version-badge/index.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/common/inline-attachments/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAC9E,YAAY,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { InlineAttachments, parseAttachmentRefs } from './inline-attachments.js';
|
package/dist/src/presentation/web/components/common/inline-attachments/inline-attachments.d.ts
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export interface InlineAttachmentsProps {
|
|
2
|
+
/** Text that may contain `@/path/to/file` attachment references. */
|
|
3
|
+
text: string;
|
|
4
|
+
/** Additional attachment paths to render (e.g. from rejection feedback). */
|
|
5
|
+
attachmentPaths?: string[];
|
|
6
|
+
}
|
|
7
|
+
interface TextSegment {
|
|
8
|
+
type: 'text';
|
|
9
|
+
value: string;
|
|
10
|
+
}
|
|
11
|
+
interface AttachmentSegment {
|
|
12
|
+
type: 'attachment';
|
|
13
|
+
path: string;
|
|
14
|
+
}
|
|
15
|
+
type Segment = TextSegment | AttachmentSegment;
|
|
16
|
+
/** Parse text into segments of plain text and attachment references. */
|
|
17
|
+
export declare function parseAttachmentRefs(text: string): Segment[];
|
|
18
|
+
export declare function InlineAttachments({ text, attachmentPaths }: InlineAttachmentsProps): import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
export {};
|
|
20
|
+
//# sourceMappingURL=inline-attachments.d.ts.map
|
package/dist/src/presentation/web/components/common/inline-attachments/inline-attachments.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inline-attachments.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/common/inline-attachments/inline-attachments.tsx"],"names":[],"mappings":"AA6BA,MAAM,WAAW,sBAAsB;IACrC,oEAAoE;IACpE,IAAI,EAAE,MAAM,CAAC;IACb,4EAA4E;IAC5E,eAAe,CAAC,EAAE,MAAM,EAAE,CAAC;CAC5B;AAED,UAAU,WAAW;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;CACf;AAED,UAAU,iBAAiB;IACzB,IAAI,EAAE,YAAY,CAAC;IACnB,IAAI,EAAE,MAAM,CAAC;CACd;AAED,KAAK,OAAO,GAAG,WAAW,GAAG,iBAAiB,CAAC;AAE/C,wEAAwE;AACxE,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,EAAE,CAwB3D;AAED,wBAAgB,iBAAiB,CAAC,EAAE,IAAI,EAAE,eAAe,EAAE,EAAE,sBAAsB,2CA4BlF"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
/* eslint-disable @next/next/no-img-element -- Local file preview requires raw <img>, not next/image */
|
|
2
|
+
'use client';
|
|
3
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
4
|
+
import { useState } from 'react';
|
|
5
|
+
import { Dialog, DialogTrigger, DialogContent, DialogTitle } from '../../ui/dialog.js';
|
|
6
|
+
import { VisuallyHidden } from 'radix-ui';
|
|
7
|
+
import { DownloadIcon, ImageOff } from 'lucide-react';
|
|
8
|
+
const IMAGE_EXTS = new Set(['.png', '.jpg', '.jpeg', '.gif', '.svg', '.webp', '.ico', '.bmp']);
|
|
9
|
+
function isImagePath(path) {
|
|
10
|
+
const dot = path.lastIndexOf('.');
|
|
11
|
+
return dot >= 0 && IMAGE_EXTS.has(path.slice(dot).toLowerCase());
|
|
12
|
+
}
|
|
13
|
+
function previewUrl(path) {
|
|
14
|
+
const ext = path.lastIndexOf('.') >= 0 ? path.slice(path.lastIndexOf('.')) : '';
|
|
15
|
+
const mimeGuess = isImagePath(path) ? `image/${ext.slice(1).replace('jpg', 'jpeg')}` : '';
|
|
16
|
+
const params = new URLSearchParams({ path, ...(mimeGuess && { mimeType: mimeGuess }) });
|
|
17
|
+
return `/api/attachments/preview?${params.toString()}`;
|
|
18
|
+
}
|
|
19
|
+
function getFilename(path) {
|
|
20
|
+
return path.split('/').pop() ?? path;
|
|
21
|
+
}
|
|
22
|
+
/** Regex matching `@/absolute/path` attachment references in text. */
|
|
23
|
+
const ATTACHMENT_REF_RE = /(?:^|\s)@(\/[^\s]+)/g;
|
|
24
|
+
/** Parse text into segments of plain text and attachment references. */
|
|
25
|
+
export function parseAttachmentRefs(text) {
|
|
26
|
+
const segments = [];
|
|
27
|
+
let lastIndex = 0;
|
|
28
|
+
for (const match of text.matchAll(ATTACHMENT_REF_RE)) {
|
|
29
|
+
const fullMatchStart = match.index;
|
|
30
|
+
// The path capture starts after the optional leading whitespace
|
|
31
|
+
const leadingWs = match[0].length - match[0].trimStart().length;
|
|
32
|
+
const refStart = fullMatchStart + leadingWs;
|
|
33
|
+
// Add text before this reference (including leading whitespace)
|
|
34
|
+
if (refStart > lastIndex) {
|
|
35
|
+
segments.push({ type: 'text', value: text.slice(lastIndex, refStart) });
|
|
36
|
+
}
|
|
37
|
+
segments.push({ type: 'attachment', path: match[1] });
|
|
38
|
+
lastIndex = fullMatchStart + match[0].length;
|
|
39
|
+
}
|
|
40
|
+
if (lastIndex < text.length) {
|
|
41
|
+
segments.push({ type: 'text', value: text.slice(lastIndex) });
|
|
42
|
+
}
|
|
43
|
+
return segments;
|
|
44
|
+
}
|
|
45
|
+
export function InlineAttachments({ text, attachmentPaths }) {
|
|
46
|
+
const segments = parseAttachmentRefs(text);
|
|
47
|
+
const hasInlineAttachments = segments.some((s) => s.type === 'attachment');
|
|
48
|
+
const extraPaths = attachmentPaths?.filter(Boolean) ?? [];
|
|
49
|
+
if (!hasInlineAttachments && extraPaths.length === 0) {
|
|
50
|
+
return _jsx("span", { className: "text-sm leading-relaxed", children: text });
|
|
51
|
+
}
|
|
52
|
+
return (_jsxs("div", { className: "flex flex-col gap-2", children: [segments.map((segment) => {
|
|
53
|
+
if (segment.type === 'text') {
|
|
54
|
+
const trimmed = segment.value.trim();
|
|
55
|
+
if (!trimmed)
|
|
56
|
+
return null;
|
|
57
|
+
return (_jsx("span", { className: "text-sm leading-relaxed", children: trimmed }, `text-${trimmed.slice(0, 40)}`));
|
|
58
|
+
}
|
|
59
|
+
return _jsx(AttachmentPreview, { path: segment.path }, `att-${segment.path}`);
|
|
60
|
+
}), extraPaths.map((path) => (_jsx(AttachmentPreview, { path: path }, `extra-${path}`)))] }));
|
|
61
|
+
}
|
|
62
|
+
function AttachmentPreview({ path }) {
|
|
63
|
+
const filename = getFilename(path);
|
|
64
|
+
const [loadError, setLoadError] = useState(false);
|
|
65
|
+
if (isImagePath(path)) {
|
|
66
|
+
if (loadError) {
|
|
67
|
+
return (_jsxs("div", { "data-testid": "inline-attachment-image-error", className: "text-muted-foreground flex items-center gap-2 rounded-md border px-3 py-2 text-sm", children: [_jsx(ImageOff, { className: "h-4 w-4 shrink-0" }), _jsx("span", { className: "truncate", children: filename })] }));
|
|
68
|
+
}
|
|
69
|
+
return (_jsxs(Dialog, { children: [_jsx(DialogTrigger, { asChild: true, children: _jsx("img", { src: previewUrl(path), alt: filename, "data-testid": "inline-attachment-image", onError: () => setLoadError(true), className: "max-h-48 max-w-full cursor-pointer rounded-md border object-contain transition-opacity hover:opacity-80" }) }), _jsxs(DialogContent, { className: "max-w-3xl gap-0 overflow-hidden border-0 p-0 [&>button:last-child]:!cursor-pointer [&>button:last-child]:!rounded-full [&>button:last-child]:!bg-black/70 [&>button:last-child]:!p-1.5 [&>button:last-child]:!text-white [&>button:last-child]:!opacity-100 [&>button:last-child]:!shadow-lg [&>button:last-child]:!backdrop-blur-md [&>button:last-child]:hover:!bg-black/90", children: [_jsx(VisuallyHidden.Root, { children: _jsxs(DialogTitle, { children: ["Preview: ", filename] }) }), _jsx("div", { className: "relative bg-black/90", children: _jsx("img", { src: previewUrl(path), alt: filename, className: "h-auto max-h-[70vh] w-full object-contain" }) }), _jsxs("div", { className: "bg-background flex items-center gap-3 px-4 py-3", children: [_jsx("div", { className: "flex min-w-0 flex-1 flex-col", children: _jsx("span", { className: "truncate text-sm font-medium", children: filename }) }), _jsx("a", { href: previewUrl(path), download: filename, className: "text-muted-foreground hover:text-foreground shrink-0 cursor-pointer rounded p-1.5 transition-colors", "aria-label": `Download ${filename}`, children: _jsx(DownloadIcon, { className: "h-4 w-4" }) })] })] })] }));
|
|
70
|
+
}
|
|
71
|
+
return (_jsx("a", { href: previewUrl(path), download: filename, "data-testid": "inline-attachment-file", className: "text-primary text-sm underline underline-offset-2", children: filename }));
|
|
72
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { InlineAttachments } from './inline-attachments.js';
|
|
3
|
+
declare const meta: Meta<typeof InlineAttachments>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof InlineAttachments>;
|
|
6
|
+
/** Plain text with no attachment references. */
|
|
7
|
+
export declare const PlainText: Story;
|
|
8
|
+
/** Text with an image attachment reference. */
|
|
9
|
+
export declare const WithImageAttachment: Story;
|
|
10
|
+
/** Text with multiple attachment references. */
|
|
11
|
+
export declare const MultipleAttachments: Story;
|
|
12
|
+
/** Text with a non-image file attachment. */
|
|
13
|
+
export declare const FileAttachment: Story;
|
|
14
|
+
/** Extra attachment paths passed via prop (e.g. rejection feedback). */
|
|
15
|
+
export declare const ExtraAttachmentPaths: Story;
|
|
16
|
+
//# sourceMappingURL=inline-attachments.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inline-attachments.stories.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/common/inline-attachments/inline-attachments.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAEzD,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,iBAAiB,CAYxC,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAEhD,gDAAgD;AAChD,eAAO,MAAM,SAAS,EAAE,KAIvB,CAAC;AAEF,+CAA+C;AAC/C,eAAO,MAAM,mBAAmB,EAAE,KAIjC,CAAC;AAEF,gDAAgD;AAChD,eAAO,MAAM,mBAAmB,EAAE,KAIjC,CAAC;AAEF,6CAA6C;AAC7C,eAAO,MAAM,cAAc,EAAE,KAI5B,CAAC;AAEF,wEAAwE;AACxE,eAAO,MAAM,oBAAoB,EAAE,KAQlC,CAAC"}
|
package/dist/src/presentation/web/components/common/inline-attachments/inline-attachments.stories.js
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { InlineAttachments } from './inline-attachments.js';
|
|
3
|
+
const meta = {
|
|
4
|
+
title: 'Common/InlineAttachments',
|
|
5
|
+
component: InlineAttachments,
|
|
6
|
+
tags: ['autodocs'],
|
|
7
|
+
parameters: { layout: 'padded' },
|
|
8
|
+
decorators: [
|
|
9
|
+
(Story) => (_jsx("div", { style: { maxWidth: '400px', border: '1px solid var(--color-border)', padding: '16px' }, children: _jsx(Story, {}) })),
|
|
10
|
+
],
|
|
11
|
+
};
|
|
12
|
+
export default meta;
|
|
13
|
+
/** Plain text with no attachment references. */
|
|
14
|
+
export const PlainText = {
|
|
15
|
+
args: {
|
|
16
|
+
text: 'Fix the login bug where users cannot sign in with Google OAuth.',
|
|
17
|
+
},
|
|
18
|
+
};
|
|
19
|
+
/** Text with an image attachment reference. */
|
|
20
|
+
export const WithImageAttachment = {
|
|
21
|
+
args: {
|
|
22
|
+
text: 'The button is misaligned, see screenshot:\n@/home/user/.shep/attachments/pending-abc/screenshot.png',
|
|
23
|
+
},
|
|
24
|
+
};
|
|
25
|
+
/** Text with multiple attachment references. */
|
|
26
|
+
export const MultipleAttachments = {
|
|
27
|
+
args: {
|
|
28
|
+
text: 'Before: @/home/user/.shep/attachments/pending-abc/before.png\nAfter: @/home/user/.shep/attachments/pending-abc/after.png',
|
|
29
|
+
},
|
|
30
|
+
};
|
|
31
|
+
/** Text with a non-image file attachment. */
|
|
32
|
+
export const FileAttachment = {
|
|
33
|
+
args: {
|
|
34
|
+
text: 'See the log file:\n@/home/user/.shep/attachments/pending-abc/error.log',
|
|
35
|
+
},
|
|
36
|
+
};
|
|
37
|
+
/** Extra attachment paths passed via prop (e.g. rejection feedback). */
|
|
38
|
+
export const ExtraAttachmentPaths = {
|
|
39
|
+
args: {
|
|
40
|
+
text: 'Please fix the layout issues',
|
|
41
|
+
attachmentPaths: [
|
|
42
|
+
'/home/user/.shep/attachments/pending-abc/screenshot1.png',
|
|
43
|
+
'/home/user/.shep/attachments/pending-abc/screenshot2.png',
|
|
44
|
+
],
|
|
45
|
+
},
|
|
46
|
+
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export interface ShepLogoProps {
|
|
2
2
|
className?: string;
|
|
3
3
|
size?: number;
|
|
4
|
+
variant?: 'default' | 'dev';
|
|
4
5
|
}
|
|
5
|
-
export declare function ShepLogo({ className, size }: ShepLogoProps): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export declare function ShepLogo({ className, size, variant }: ShepLogoProps): import("react/jsx-runtime").JSX.Element;
|
|
6
7
|
//# sourceMappingURL=shep-logo.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shep-logo.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/common/shep-logo/shep-logo.tsx"],"names":[],"mappings":"AAEA,MAAM,WAAW,aAAa;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"shep-logo.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/common/shep-logo/shep-logo.tsx"],"names":[],"mappings":"AAEA,MAAM,WAAW,aAAa;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,SAAS,GAAG,KAAK,CAAC;CAC7B;AAED,wBAAgB,QAAQ,CAAC,EAAE,SAAS,EAAE,IAAS,EAAE,OAAmB,EAAE,EAAE,aAAa,2CAkBpF"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { cn } from '../../../lib/utils.js';
|
|
3
|
-
export function ShepLogo({ className, size = 24 }) {
|
|
4
|
-
return (_jsx("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 194 200", width: size, height: size, className: cn('shrink-0', className), "aria-hidden": "true", children: _jsx("g", { transform: "matrix(1, 0, 0, 1, -111, -208)", children: _jsx("path", { d: "M 198 406 C196,405 194,403 193,401 C192,399 191,398 186,398 C178,397 174,394 170,387 L 168 381 L 163 381 C156,381 150,377 147,370 C144,364 143,359 146,353 C148,348 148,347 147,347 C145,347 140,343 138,339 C133,329 139,314 149,311 L 152 311 L 149 307 C145,302 145,294 149,290 C151,288 152,287 151,286 C150,283 152,278 155,276 C156,275 159,274 162,273 C165,273 166,273 168,276 C171,278 171,280 172,287 C173,294 174,297 177,304 C180,309 182,314 183,316 C186,327 193,336 199,339 C204,342 211,342 216,340 C222,336 231,324 234,314 C235,312 237,307 239,302 C240,298 242,292 242,289 C243,281 245,278 247,275 C250,273 251,273 255,273 C261,274 264,278 264,282 C264,284 264,286 263,287 C262,287 263,288 265,290 C272,295 272,303 267,309 L 265 312 L 269 314 C276,317 279,323 279,332 C279,339 277,343 272,347 C268,351 268,351 269,354 C272,358 271,366 269,371 C266,376 259,381 254,381 C252,381 251,382 248,386 C242,395 234,400 227,399 C224,398 223,398 221,401 C220,403 217,405 216,406 C211,409 203,409 198,406 ZM 136 271 C123,267 115,262 113,256 C111,251 111,251 113,251 C118,254 124,254 132,252 C136,252 141,251 144,251 C149,251 157,253 162,256 C166,258 166,258 166,264 L 166 269 L 160 270 C149,272 142,272 136,271 ZM 264 271 C263,271 259,270 256,270 L 250 270 L 250 265 C249,259 250,257 259,254 C265,251 272,251 289,252 C297,253 299,253 302,252 C305,250 305,250 305,252 C305,255 301,262 297,264 C289,270 272,273 264,271 ZM 162 249 C160,247 159,245 159,242 C159,236 164,230 169,230 C170,230 171,228 171,225 C171,216 176,210 184,209 C189,209 195,211 195,213 C195,214 196,213 197,212 C201,209 204,208 208,208 C212,208 217,210 219,212 C220,214 220,213 223,211 C226,208 234,208 239,211 C243,214 246,221 246,226 C245,230 245,230 247,230 C253,230 258,238 257,244 C256,249 251,252 245,252 C241,252 237,251 234,248 C232,247 232,247 228,249 C225,251 222,252 220,252 C216,252 212,250 210,247 C209,246 209,246 206,248 C201,252 192,253 185,248 C183,247 183,247 178,249 C172,253 166,253 162,249 ZM 116 249 C112,248 114,247 119,247 C122,247 127,246 130,245 C138,242 146,242 152,245 L 158 248 L 148 247 C142,247 138,247 133,248 C128,250 120,250 116,249 ZM 284 248 C281,247 277,247 270,247 L 260 248 L 263 246 C269,243 276,242 284,245 C289,246 295,247 298,247 C303,247 304,247 303,248 C301,250 289,250 284,248 Z", fill: "currentColor" }) }) }));
|
|
3
|
+
export function ShepLogo({ className, size = 24, variant = 'default' }) {
|
|
4
|
+
return (_jsx("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 194 200", width: size, height: size, className: cn('shrink-0', variant === 'dev' && 'text-cyan-400', className), "aria-hidden": "true", children: _jsx("g", { transform: "matrix(1, 0, 0, 1, -111, -208)", children: _jsx("path", { d: "M 198 406 C196,405 194,403 193,401 C192,399 191,398 186,398 C178,397 174,394 170,387 L 168 381 L 163 381 C156,381 150,377 147,370 C144,364 143,359 146,353 C148,348 148,347 147,347 C145,347 140,343 138,339 C133,329 139,314 149,311 L 152 311 L 149 307 C145,302 145,294 149,290 C151,288 152,287 151,286 C150,283 152,278 155,276 C156,275 159,274 162,273 C165,273 166,273 168,276 C171,278 171,280 172,287 C173,294 174,297 177,304 C180,309 182,314 183,316 C186,327 193,336 199,339 C204,342 211,342 216,340 C222,336 231,324 234,314 C235,312 237,307 239,302 C240,298 242,292 242,289 C243,281 245,278 247,275 C250,273 251,273 255,273 C261,274 264,278 264,282 C264,284 264,286 263,287 C262,287 263,288 265,290 C272,295 272,303 267,309 L 265 312 L 269 314 C276,317 279,323 279,332 C279,339 277,343 272,347 C268,351 268,351 269,354 C272,358 271,366 269,371 C266,376 259,381 254,381 C252,381 251,382 248,386 C242,395 234,400 227,399 C224,398 223,398 221,401 C220,403 217,405 216,406 C211,409 203,409 198,406 ZM 136 271 C123,267 115,262 113,256 C111,251 111,251 113,251 C118,254 124,254 132,252 C136,252 141,251 144,251 C149,251 157,253 162,256 C166,258 166,258 166,264 L 166 269 L 160 270 C149,272 142,272 136,271 ZM 264 271 C263,271 259,270 256,270 L 250 270 L 250 265 C249,259 250,257 259,254 C265,251 272,251 289,252 C297,253 299,253 302,252 C305,250 305,250 305,252 C305,255 301,262 297,264 C289,270 272,273 264,271 ZM 162 249 C160,247 159,245 159,242 C159,236 164,230 169,230 C170,230 171,228 171,225 C171,216 176,210 184,209 C189,209 195,211 195,213 C195,214 196,213 197,212 C201,209 204,208 208,208 C212,208 217,210 219,212 C220,214 220,213 223,211 C226,208 234,208 239,211 C243,214 246,221 246,226 C245,230 245,230 247,230 C253,230 258,238 257,244 C256,249 251,252 245,252 C241,252 237,251 234,248 C232,247 232,247 228,249 C225,251 222,252 220,252 C216,252 212,250 210,247 C209,246 209,246 206,248 C201,252 192,253 185,248 C183,247 183,247 178,249 C172,253 166,253 162,249 ZM 116 249 C112,248 114,247 119,247 C122,247 127,246 130,245 C138,242 146,242 152,245 L 158 248 L 148 247 C142,247 138,247 133,248 C128,250 120,250 116,249 ZM 284 248 C281,247 277,247 270,247 L 260 248 L 263 246 C269,243 276,242 284,245 C289,246 295,247 298,247 C303,247 304,247 303,248 C301,250 289,250 284,248 Z", fill: "currentColor" }) }) }));
|
|
5
5
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shep-logo.stories.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/common/shep-logo/shep-logo.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAEvC,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,QAAQ,CAO/B,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAAU,CAAC;AAEjC,eAAO,MAAM,KAAK,EAAE,KAInB,CAAC;AAEF,eAAO,MAAM,KAAK,EAAE,KAInB,CAAC"}
|
|
1
|
+
{"version":3,"file":"shep-logo.stories.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/common/shep-logo/shep-logo.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAEvC,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,QAAQ,CAO/B,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAAU,CAAC;AAEjC,eAAO,MAAM,KAAK,EAAE,KAInB,CAAC;AAEF,eAAO,MAAM,KAAK,EAAE,KAInB,CAAC;AAEF,eAAO,MAAM,OAAO,EAAE,KAIrB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/common/version-badge/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,YAAY,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { VersionBadge } from './version-badge.js';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export interface VersionBadgeProps {
|
|
2
|
+
version: string;
|
|
3
|
+
branch?: string;
|
|
4
|
+
commitHash?: string;
|
|
5
|
+
isDev?: boolean;
|
|
6
|
+
packageName?: string;
|
|
7
|
+
description?: string;
|
|
8
|
+
nodeVersion?: string;
|
|
9
|
+
platform?: string;
|
|
10
|
+
}
|
|
11
|
+
export declare function VersionBadge({ version, branch, commitHash, isDev, packageName, description, nodeVersion, platform, }: VersionBadgeProps): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
//# sourceMappingURL=version-badge.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"version-badge.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/common/version-badge/version-badge.tsx"],"names":[],"mappings":"AAKA,MAAM,WAAW,iBAAiB;IAChC,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,wBAAgB,YAAY,CAAC,EAC3B,OAAO,EACP,MAAM,EACN,UAAU,EACV,KAAa,EACb,WAA2B,EAC3B,WAAW,EACX,WAAW,EACX,QAAQ,GACT,EAAE,iBAAiB,2CA2DnB"}
|