-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpywire_language_server
More file actions
executable file
·36 lines (32 loc) · 1018 Bytes
/
pywire_language_server
File metadata and controls
executable file
·36 lines (32 loc) · 1018 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/usr/bin/env python3
"""Entry point for PyWire Language Server"""
import sys
import json
import time
from pathlib import Path
# #region agent log
try:
with open('/Users/rholmdahl/projects/pywire/.cursor/debug.log', 'a') as f:
log_entry = {
"sessionId": "debug-session",
"runId": "run1",
"hypothesisId": "H3",
"location": "pywire_language_server:start",
"message": "Server process started",
"data": {
"sys.executable": sys.executable,
"sys.prefix": sys.prefix,
"sys.path": sys.path,
"cwd": str(Path.cwd())
},
"timestamp": int(time.time() * 1000)
}
f.write(json.dumps(log_entry) + "\n")
except Exception:
pass
# #endregion
# Add src to path so we can import pywire_language_server
sys.path.insert(0, str(Path(__file__).parent / 'src'))
from pywire_language_server.server import start
if __name__ == '__main__':
start()