@@ -5,6 +5,7 @@ import { isGrpcRequest } from '../../models/grpc-request';
5
5
import { isRemoteProject } from '../../models/project' ;
6
6
import { Request , RequestHeader } from '../../models/request' ;
7
7
import type { Response } from '../../models/response' ;
8
+ import { isWebSocketRequest } from '../../models/websocket-request' ;
8
9
import { isCollection , isDesign } from '../../models/workspace' ;
9
10
import { VCS } from '../../sync/vcs/vcs' ;
10
11
import {
@@ -27,6 +28,8 @@ import { RequestPane } from './panes/request-pane';
27
28
import { ResponsePane } from './panes/response-pane' ;
28
29
import { SidebarChildren } from './sidebar/sidebar-children' ;
29
30
import { SidebarFilter } from './sidebar/sidebar-filter' ;
31
+ import { WebSocketRequestPane } from './websocket-request-pane' ;
32
+ import { WebSocketResponsePane } from './websocket-response-pane' ;
30
33
import { WorkspacePageHeader } from './workspace-page-header' ;
31
34
import type { HandleActivityChange } from './wrapper' ;
32
35
@@ -114,42 +117,56 @@ export const WrapperDebug: FC<Props> = ({
114
117
: null }
115
118
renderPaneOne = { activeWorkspace ?
116
119
< ErrorBoundary showAlert >
117
- { activeRequest && isGrpcRequest ( activeRequest ) ?
118
- < GrpcRequestPane
119
- activeRequest = { activeRequest }
120
- environmentId = { activeEnvironment ? activeEnvironment . _id : '' }
121
- workspaceId = { activeWorkspace . _id }
122
- forceRefreshKey = { forceRefreshKey }
123
- settings = { settings }
124
- />
125
- :
126
- < RequestPane
127
- environmentId = { activeEnvironment ? activeEnvironment . _id : '' }
128
- forceRefreshCounter = { forceRefreshKey }
129
- forceUpdateRequest = { handleForceUpdateRequest }
130
- forceUpdateRequestHeaders = { handleForceUpdateRequestHeaders }
131
- handleImport = { handleImport }
132
- headerEditorKey = { headerEditorKey }
133
- request = { activeRequest }
134
- settings = { settings }
135
- updateRequestMimeType = { handleUpdateRequestMimeType }
136
- workspace = { activeWorkspace }
137
- /> }
120
+ { activeRequest && (
121
+ isGrpcRequest ( activeRequest ) ? (
122
+ < GrpcRequestPane
123
+ activeRequest = { activeRequest }
124
+ environmentId = { activeEnvironment ? activeEnvironment . _id : '' }
125
+ workspaceId = { activeWorkspace . _id }
126
+ forceRefreshKey = { forceRefreshKey }
127
+ settings = { settings }
128
+ />
129
+ ) : (
130
+ isWebSocketRequest ( activeRequest ) ? (
131
+ < WebSocketRequestPane />
132
+ ) : (
133
+ < RequestPane
134
+ environmentId = { activeEnvironment ? activeEnvironment . _id : '' }
135
+ forceRefreshCounter = { forceRefreshKey }
136
+ forceUpdateRequest = { handleForceUpdateRequest }
137
+ forceUpdateRequestHeaders = { handleForceUpdateRequestHeaders }
138
+ handleImport = { handleImport }
139
+ headerEditorKey = { headerEditorKey }
140
+ request = { activeRequest }
141
+ settings = { settings }
142
+ updateRequestMimeType = { handleUpdateRequestMimeType }
143
+ workspace = { activeWorkspace }
144
+ />
145
+ )
146
+ )
147
+ ) }
138
148
</ ErrorBoundary >
139
149
: null }
140
150
renderPaneTwo = {
141
151
< ErrorBoundary showAlert >
142
- { activeRequest && isGrpcRequest ( activeRequest ) ?
143
- < GrpcResponsePane
144
- activeRequest = { activeRequest }
145
- forceRefreshKey = { forceRefreshKey }
146
- />
147
- :
148
- < ResponsePane
149
- handleSetFilter = { handleSetResponseFilter }
150
- request = { activeRequest }
151
- handleSetActiveResponse = { handleSetActiveResponse }
152
- /> }
152
+ { activeRequest && (
153
+ isGrpcRequest ( activeRequest ) ? (
154
+ < GrpcResponsePane
155
+ activeRequest = { activeRequest }
156
+ forceRefreshKey = { forceRefreshKey }
157
+ />
158
+ ) : (
159
+ isWebSocketRequest ( activeRequest ) ? (
160
+ < WebSocketResponsePane />
161
+ ) : (
162
+ < ResponsePane
163
+ handleSetFilter = { handleSetResponseFilter }
164
+ request = { activeRequest }
165
+ handleSetActiveResponse = { handleSetActiveResponse }
166
+ />
167
+ )
168
+ )
169
+ ) }
153
170
</ ErrorBoundary > }
154
171
/>
155
172
) ;
0 commit comments