Skip to content

Commit

Permalink
Remove header
Browse files Browse the repository at this point in the history
  • Loading branch information
lukasmasuch committed Jan 9, 2024
1 parent a8c2cb6 commit c4109e7
Showing 1 changed file with 3 additions and 21 deletions.
Original file line number Diff line number Diff line change
@@ -1,21 +1,6 @@
// Mimic https://github.com/streamlit/streamlit/blob/1.27.0/frontend/app/src/connection/ConnectionManager.ts
// and WebsocketConnection.

/**
* Copyright (c) Streamlit Inc. (2018-2022) Snowflake Inc. (2022)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { ReactNode } from "react"

import {
Expand Down Expand Up @@ -232,19 +217,16 @@ export class ConnectionManager {

private async connect(): Promise<void> {
const WEBSOCKET_STREAM_PATH = "_stcore/stream" // The original is defined in streamlit/frontend/src/lib/WebsocketConnection.tsx

try {
// Stlite Modifications:
// this.connection = await this.connectToRunningServer()
await this.props.kernel.connectWebSocket("/" + WEBSOCKET_STREAM_PATH)
this.setConnectionState(ConnectionState.CONNECTED)
} catch (e) {
const err = ensureError(e)
logError(err.message)
this.setConnectionState(
ConnectionState.DISCONNECTED_FOREVER,
err.message
)
console.error(err.message)
this.setConnectionState(ConnectionState.DISCONNECTED_FOREVER, err.message)
}
}

Expand Down

0 comments on commit c4109e7

Please sign in to comment.