Skip to content

Commit

Permalink
omg it works
Browse files Browse the repository at this point in the history
  • Loading branch information
furudean committed Nov 22, 2024
1 parent d458baa commit f1973d6
Show file tree
Hide file tree
Showing 5 changed files with 262 additions and 268 deletions.
6 changes: 3 additions & 3 deletions src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ export function activate(context: vscode.ExtensionContext) {
const pm = new ProcessManager()
const ds = new DecorationService({ context })
const wss = new WarpSocketService({
pm,
status_bar,
context,
async message_handler(process, message) {
const messsage_handler: Record<string, () => Promise<void> | void> =
{
Expand Down Expand Up @@ -66,9 +69,6 @@ export function activate(context: vscode.ExtensionContext) {
logger.error('unhandled socket message:', message)
}
},
pm,
status_bar,
context,
})

context.subscriptions.push(pm, follow_cursor, status_bar, ds)
Expand Down
15 changes: 1 addition & 14 deletions src/lib/commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -246,20 +246,7 @@ export function get_commands(

'renpyWarp.startSocketServer': async () => {
if (get_config('renpyExtensionsEnabled') === 'Enabled') {
const server = await wss.start()
if (!server) {
vscode.window
.showErrorMessage(
'Failed to start socket server',
'OK',
'Logs'
)
.then((selection) => {
if (selection === 'Logs') {
logger.show()
}
})
}
await wss.start()
} else {
vscode.window.showErrorMessage(
"Ren'Py extensions must be enabled to use the socket server",
Expand Down
2 changes: 1 addition & 1 deletion src/lib/path.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ export async function find_projects_in_workspaces(): Promise<string[]> {
'**/game/**/*.rpy'
)
const files = await vscode.workspace.findFiles(pattern)
logger.debug(`files in workspace: ${files.map((file) => file.fsPath)}`)
logger.trace(`files in workspace: ${files.map((file) => file.fsPath)}`)

for (const file of files) {
const relative = path.relative(workspace.uri.fsPath, file.fsPath)
Expand Down
Loading

0 comments on commit f1973d6

Please sign in to comment.