File tree Expand file tree Collapse file tree 5 files changed +12
-6
lines changed Expand file tree Collapse file tree 5 files changed +12
-6
lines changed Original file line number Diff line number Diff line change @@ -23,7 +23,9 @@ export default function App() {
2323 const [ serverOnline , setServerOnline ] = useState ( false ) ;
2424 const [ isUserOperating , setIsUserOperating ] = useState ( false ) ;
2525 const [ isNarrowScreen , setIsNarrowScreen ] = useState ( false ) ;
26- const [ deviceType , setDeviceType ] = useState < 'web' | 'android' | 'ios' > ( 'web' ) ;
26+ const [ deviceType , setDeviceType ] = useState < 'web' | 'android' | 'ios' > (
27+ 'web' ,
28+ ) ;
2729
2830 // Create PlaygroundSDK and storage provider
2931 const playgroundSDK = useMemo ( ( ) => {
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ import { EnvConfigReminder } from '../env-config-reminder';
1414import { PlaygroundResultView } from '../playground-result' ;
1515import './index.less' ;
1616import PlaygroundIcon from '../../icons/avatar.svg' ;
17+ import { defaultMainButtons } from '../../utils/constants' ;
1718import { PromptInput } from '../prompt-input' ;
1819import {
1920 createStorageProvider ,
@@ -62,6 +63,13 @@ export function UniversalPlayground({
6263 const { config } = useEnvConfig ( ) ;
6364 const [ sdkReady , setSdkReady ] = useState ( false ) ;
6465
66+ // Initialize form with default type on mount
67+ useEffect ( ( ) => {
68+ form . setFieldsValue ( {
69+ type : defaultMainButtons [ 0 ] ,
70+ } ) ;
71+ } , [ form ] ) ;
72+
6573 // Initialize SDK ID on mount for remote execution
6674 useEffect ( ( ) => {
6775 const initializeSDK = async ( ) => {
Original file line number Diff line number Diff line change 1- import './component/playground/index.less' ;
2- import './component/universal-playground/index.less' ;
3- import './components/screenshot-viewer/index.less' ;
4-
51export {
62 type AnimationScript ,
73 type ReplayScriptsInfo ,
@@ -37,7 +33,7 @@ export { ContextPreview } from './component/context-preview';
3733export { PromptInput } from './component/prompt-input' ;
3834export { Player } from './component/player' ;
3935export { Blackboard } from './component/blackboard' ;
40- export { default as ScreenshotViewer } from './components /screenshot-viewer' ;
36+ export { default as ScreenshotViewer } from './component /screenshot-viewer' ;
4137
4238// Export playground utilities
4339export {
You can’t perform that action at this time.
0 commit comments