Skip to content

Commit c3583e3

Browse files
feat(devtools): extract theme to devtool components (TanStack#366)
* feat(devtools): extract theme to devtool components * chore: bump versions
1 parent d87f767 commit c3583e3

7 files changed

Lines changed: 59 additions & 33 deletions

File tree

.changeset/moody-wings-type.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@tanstack/ai-devtools-core': patch
3+
---
4+
5+
Moves devtools theme to the component to avoid theme miss-match.

packages/typescript/ai-devtools/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,8 @@
8080
"dependencies": {
8181
"@tanstack/ai": "workspace:*",
8282
"@tanstack/ai-event-client": "workspace:*",
83-
"@tanstack/devtools-ui": "^0.5.0",
84-
"@tanstack/devtools-utils": "0.3.2",
83+
"@tanstack/devtools-ui": "^0.5.1",
84+
"@tanstack/devtools-utils": "^0.4.0",
8585
"goober": "^2.1.18",
8686
"solid-js": "^1.9.10"
8787
},

packages/typescript/ai-devtools/src/components/Shell.tsx

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,28 @@
11
import { createSignal, onCleanup, onMount } from 'solid-js'
2-
import { Header, HeaderLogo, MainPanel } from '@tanstack/devtools-ui'
2+
import {
3+
Header,
4+
HeaderLogo,
5+
MainPanel,
6+
ThemeContextProvider,
7+
} from '@tanstack/devtools-ui'
38
import { useStyles } from '../styles/use-styles'
49
import { AIProvider } from '../store/ai-context'
510
import { ConversationsList } from './ConversationsList'
611
import { ConversationDetails } from './ConversationDetails'
712

8-
export default function Devtools() {
13+
import type { TanStackDevtoolsTheme } from '@tanstack/devtools-ui'
14+
15+
interface DevtoolProps {
16+
theme: TanStackDevtoolsTheme
17+
}
18+
19+
export default function Devtools(props: DevtoolProps) {
920
return (
10-
<AIProvider>
11-
<DevtoolsContent />
12-
</AIProvider>
21+
<ThemeContextProvider theme={props.theme}>
22+
<AIProvider>
23+
<DevtoolsContent />
24+
</AIProvider>
25+
</ThemeContextProvider>
1326
)
1427
}
1528

packages/typescript/preact-ai-devtools/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
],
5050
"dependencies": {
5151
"@tanstack/ai-devtools-core": "workspace:*",
52-
"@tanstack/devtools-utils": "0.3.2"
52+
"@tanstack/devtools-utils": "^0.4.0"
5353
},
5454
"devDependencies": {
5555
"@vitest/coverage-v8": "4.0.14",

packages/typescript/react-ai-devtools/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
],
5050
"dependencies": {
5151
"@tanstack/ai-devtools-core": "workspace:*",
52-
"@tanstack/devtools-utils": "0.3.2"
52+
"@tanstack/devtools-utils": "^0.4.0"
5353
},
5454
"peerDependencies": {
5555
"@types/react": "^17.0.0 || ^18.0.0 || ^19.0.0",

packages/typescript/solid-ai-devtools/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
],
4949
"dependencies": {
5050
"@tanstack/ai-devtools-core": "workspace:*",
51-
"@tanstack/devtools-utils": "0.3.2"
51+
"@tanstack/devtools-utils": "^0.4.0"
5252
},
5353
"peerDependencies": {
5454
"solid-js": ">=1.9.7"

pnpm-lock.yaml

Lines changed: 31 additions & 23 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)