Compare commits
No commits in common. "f18c31df6c069625a7e86bf09c59755e5389da12" and "3dca3e5b233f63522291df5051abb09c0a4099a2" have entirely different histories.
f18c31df6c
...
3dca3e5b23
1
.gitignore
vendored
1
.gitignore
vendored
@ -6,4 +6,3 @@ dist/
|
|||||||
build/
|
build/
|
||||||
*.kate-swp
|
*.kate-swp
|
||||||
.directory
|
.directory
|
||||||
CLAUDE.md
|
|
||||||
|
@ -79,12 +79,10 @@ class command():
|
|||||||
# Pattern 1b: Time/token activity (not percentage-based, so use single beep)
|
# Pattern 1b: Time/token activity (not percentage-based, so use single beep)
|
||||||
timeMatch = re.search(r'(\d+)s\s', text)
|
timeMatch = re.search(r'(\d+)s\s', text)
|
||||||
tokenMatch = re.search(r'(\d+)\s+tokens', text)
|
tokenMatch = re.search(r'(\d+)\s+tokens', text)
|
||||||
# Pattern 1c: dd command output (bytes copied with transfer rate)
|
# Pattern 1c: Curl-style transfer data (bytes, speed indicators)
|
||||||
ddMatch = re.search(r'\d+\s+bytes.*copied.*\d+\s+s.*[kMGT]?B/s', text)
|
|
||||||
# Pattern 1d: Curl-style transfer data (bytes, speed indicators)
|
|
||||||
curlMatch = re.search(r'(\d+\s+\d+\s+\d+\s+\d+.*?(?:k|M|G)?.*?--:--:--|Speed)', text)
|
curlMatch = re.search(r'(\d+\s+\d+\s+\d+\s+\d+.*?(?:k|M|G)?.*?--:--:--|Speed)', text)
|
||||||
|
|
||||||
if timeMatch or tokenMatch or ddMatch or curlMatch:
|
if timeMatch or tokenMatch or curlMatch:
|
||||||
# For non-percentage progress, use a single activity beep every 2 seconds
|
# For non-percentage progress, use a single activity beep every 2 seconds
|
||||||
if currentTime - self.env['commandBuffer']['lastProgressTime'] >= 2.0:
|
if currentTime - self.env['commandBuffer']['lastProgressTime'] >= 2.0:
|
||||||
self.env['runtime']['debug'].writeDebugOut("Playing activity beep for transfer progress", debug.debugLevel.INFO)
|
self.env['runtime']['debug'].writeDebugOut("Playing activity beep for transfer progress", debug.debugLevel.INFO)
|
||||||
|
@ -45,17 +45,28 @@ class driver(remoteDriver):
|
|||||||
continue
|
continue
|
||||||
if self.fenrirSock in r:
|
if self.fenrirSock in r:
|
||||||
client_sock, client_addr = self.fenrirSock.accept()
|
client_sock, client_addr = self.fenrirSock.accept()
|
||||||
|
response = "ERROR: Failed to process command\n"
|
||||||
try:
|
try:
|
||||||
rawdata = client_sock.recv(8129)
|
rawdata = client_sock.recv(8129)
|
||||||
except:
|
|
||||||
pass
|
|
||||||
try:
|
|
||||||
data = rawdata.decode("utf-8").rstrip().lstrip()
|
data = rawdata.decode("utf-8").rstrip().lstrip()
|
||||||
eventQueue.put({"Type":fenrirEventType.RemoteIncomming,
|
if data:
|
||||||
"Data": data
|
# Process the command and get response
|
||||||
})
|
result = self.env['runtime']['remoteManager'].handleRemoteIncommingWithResponse(data)
|
||||||
|
if result['success']:
|
||||||
|
response = f"OK: {result['message']}\n"
|
||||||
|
else:
|
||||||
|
response = f"ERROR: {result['message']}\n"
|
||||||
|
else:
|
||||||
|
response = "ERROR: Empty command\n"
|
||||||
|
except Exception as e:
|
||||||
|
response = f"ERROR: {str(e)}\n"
|
||||||
|
|
||||||
|
# Send response back to client
|
||||||
|
try:
|
||||||
|
client_sock.send(response.encode("utf-8"))
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
try:
|
try:
|
||||||
client_sock.close()
|
client_sock.close()
|
||||||
except:
|
except:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user