@shipfox/client-projects 3.0.1 → 4.0.0
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/.turbo/turbo-build.log +1 -1
- package/CHANGELOG.md +18 -0
- package/dist/components/model-provider-reminder-banner.d.ts.map +1 -1
- package/dist/components/model-provider-reminder-banner.js +11 -15
- package/dist/components/model-provider-reminder-banner.js.map +1 -1
- package/dist/tsconfig.test.tsbuildinfo +1 -1
- package/package.json +9 -41
- package/src/components/model-provider-reminder-banner.tsx +11 -18
- package/tsconfig.build.tsbuildinfo +1 -1
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shipfox/client-projects",
|
|
3
3
|
"license": "MIT",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "4.0.0",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "git+https://github.com/ShipfoxHQ/shipfox.git",
|
|
@@ -32,16 +32,16 @@
|
|
|
32
32
|
"@swc/helpers": "^0.5.17",
|
|
33
33
|
"@tanstack/react-form": "^1.32.0",
|
|
34
34
|
"@shipfox/api-definitions-dto": "6.0.0",
|
|
35
|
-
"@shipfox/api-integration-core-dto": "6.0.0",
|
|
36
35
|
"@shipfox/api-projects-dto": "6.0.0",
|
|
36
|
+
"@shipfox/api-integration-core-dto": "6.0.0",
|
|
37
37
|
"@shipfox/api-workflows-dto": "6.0.0",
|
|
38
|
-
"@shipfox/client-agent": "
|
|
39
|
-
"@shipfox/client-api": "
|
|
40
|
-
"@shipfox/client-auth": "
|
|
41
|
-
"@shipfox/client-
|
|
42
|
-
"@shipfox/client-
|
|
43
|
-
"@shipfox/client-workflows": "
|
|
44
|
-
"@shipfox/client-ui": "
|
|
38
|
+
"@shipfox/client-agent": "4.0.0",
|
|
39
|
+
"@shipfox/client-api": "4.0.0",
|
|
40
|
+
"@shipfox/client-auth": "4.0.0",
|
|
41
|
+
"@shipfox/client-shell": "4.0.0",
|
|
42
|
+
"@shipfox/client-integrations": "4.0.0",
|
|
43
|
+
"@shipfox/client-workflows": "4.0.0",
|
|
44
|
+
"@shipfox/client-ui": "4.0.0",
|
|
45
45
|
"@shipfox/react-ui": "0.3.5"
|
|
46
46
|
},
|
|
47
47
|
"peerDependencies": {
|
|
@@ -51,38 +51,6 @@
|
|
|
51
51
|
"react": "^19.0.0",
|
|
52
52
|
"react-dom": "^19.0.0"
|
|
53
53
|
},
|
|
54
|
-
"devDependencies": {
|
|
55
|
-
"@argos-ci/cli": "^5.0.0",
|
|
56
|
-
"@argos-ci/storybook": "^6.0.0",
|
|
57
|
-
"@storybook/addon-vitest": "^10.3.6",
|
|
58
|
-
"@storybook/react": "^10.0.0",
|
|
59
|
-
"@storybook/react-vite": "^10.0.0",
|
|
60
|
-
"@tailwindcss/vite": "^4.1.13",
|
|
61
|
-
"@tanstack/react-query": "^5.101.0",
|
|
62
|
-
"@tanstack/react-router": "^1.170.16",
|
|
63
|
-
"@testing-library/jest-dom": "^6.6.3",
|
|
64
|
-
"@testing-library/react": "^16.3.2",
|
|
65
|
-
"@testing-library/user-event": "^14.6.1",
|
|
66
|
-
"@types/react": "^19.1.11",
|
|
67
|
-
"@types/react-dom": "^19.1.7",
|
|
68
|
-
"@vitejs/plugin-react": "^6.0.0",
|
|
69
|
-
"@vitest/browser-playwright": "^4.1.5",
|
|
70
|
-
"jotai": "^2.19.1",
|
|
71
|
-
"jsdom": "^29.0.0",
|
|
72
|
-
"react": "^19.1.1",
|
|
73
|
-
"react-dom": "^19.1.1",
|
|
74
|
-
"storybook": "^10.0.0",
|
|
75
|
-
"storybook-addon-pseudo-states": "^10.0.0",
|
|
76
|
-
"tailwindcss": "^4.1.13",
|
|
77
|
-
"vite": "^8.0.3",
|
|
78
|
-
"vitest": "^4.1.5",
|
|
79
|
-
"@shipfox/biome": "1.8.2",
|
|
80
|
-
"@shipfox/client-test-setup": "0.0.3",
|
|
81
|
-
"@shipfox/swc": "1.2.6",
|
|
82
|
-
"@shipfox/ts-config": "1.3.8",
|
|
83
|
-
"@shipfox/typescript": "1.1.7",
|
|
84
|
-
"@shipfox/vitest": "1.2.3"
|
|
85
|
-
},
|
|
86
54
|
"scripts": {
|
|
87
55
|
"build": "shipfox-swc",
|
|
88
56
|
"check": "shipfox-biome-check",
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import {useModelProviderConfigsQuery} from '@shipfox/client-agent';
|
|
2
|
+
import {createTypedBrowserStorage, sessionStorageOrUndefined} from '@shipfox/client-ui';
|
|
2
3
|
import {
|
|
3
4
|
Alert,
|
|
4
5
|
AlertActions,
|
|
@@ -11,8 +12,6 @@ import {Button} from '@shipfox/react-ui/button';
|
|
|
11
12
|
import {Link} from '@tanstack/react-router';
|
|
12
13
|
import {useState} from 'react';
|
|
13
14
|
|
|
14
|
-
const REMINDER_SESSION_KEY_PREFIX = 'shipfox.modelProviderReminder.dismissed.';
|
|
15
|
-
|
|
16
15
|
export function ModelProviderReminderBanner({workspaceId}: {workspaceId: string}) {
|
|
17
16
|
const configsQuery = useModelProviderConfigsQuery(workspaceId);
|
|
18
17
|
const [dismissed, setDismissed] = useState(() => isReminderDismissed(workspaceId));
|
|
@@ -54,25 +53,19 @@ export function ModelProviderReminderBanner({workspaceId}: {workspaceId: string}
|
|
|
54
53
|
}
|
|
55
54
|
|
|
56
55
|
function isReminderDismissed(workspaceId: string): boolean {
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
try {
|
|
60
|
-
return window.sessionStorage.getItem(sessionKey(workspaceId)) === 'true';
|
|
61
|
-
} catch {
|
|
62
|
-
return false;
|
|
63
|
-
}
|
|
56
|
+
return reminderStorage(workspaceId).read() === true;
|
|
64
57
|
}
|
|
65
58
|
|
|
66
59
|
function dismissReminder(workspaceId: string): void {
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
try {
|
|
70
|
-
window.sessionStorage.setItem(sessionKey(workspaceId), 'true');
|
|
71
|
-
} catch {
|
|
72
|
-
// Session persistence is best-effort; showing the banner again is benign.
|
|
73
|
-
}
|
|
60
|
+
reminderStorage(workspaceId).write(true);
|
|
74
61
|
}
|
|
75
62
|
|
|
76
|
-
function
|
|
77
|
-
return
|
|
63
|
+
function reminderStorage(workspaceId: string) {
|
|
64
|
+
return createTypedBrowserStorage(sessionStorageOrUndefined, {
|
|
65
|
+
key: `shipfox.modelProviderReminder.dismissed.${workspaceId}`,
|
|
66
|
+
lifetime: 'session' as const,
|
|
67
|
+
principalScope: 'workspace' as const,
|
|
68
|
+
serialize: (dismissed: boolean) => JSON.stringify(dismissed),
|
|
69
|
+
parse: (raw: string) => raw === 'true',
|
|
70
|
+
});
|
|
78
71
|
}
|