Compare commits
	
		
			4 Commits
		
	
	
		
			3dca3e5b23
			...
			f18c31df6c
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 
						 | 
					f18c31df6c | ||
| 
						 | 
					ca0e3b5987 | ||
| 
						 | 
					0009d90a68 | ||
| 
						 | 
					2c2efc56f0 | 
							
								
								
									
										1
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										1
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							@@ -6,3 +6,4 @@ dist/
 | 
			
		||||
build/
 | 
			
		||||
*.kate-swp
 | 
			
		||||
.directory
 | 
			
		||||
CLAUDE.md
 | 
			
		||||
 
 | 
			
		||||
@@ -79,10 +79,12 @@ class command():
 | 
			
		||||
        # Pattern 1b: Time/token activity (not percentage-based, so use single beep)
 | 
			
		||||
        timeMatch = re.search(r'(\d+)s\s', text)
 | 
			
		||||
        tokenMatch = re.search(r'(\d+)\s+tokens', text)
 | 
			
		||||
        # Pattern 1c: Curl-style transfer data (bytes, speed indicators)
 | 
			
		||||
        # Pattern 1c: dd command output (bytes copied with transfer rate)
 | 
			
		||||
        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)
 | 
			
		||||
        
 | 
			
		||||
        if timeMatch or tokenMatch or curlMatch:
 | 
			
		||||
        if timeMatch or tokenMatch or ddMatch or curlMatch:
 | 
			
		||||
            # For non-percentage progress, use a single activity beep every 2 seconds
 | 
			
		||||
            if currentTime - self.env['commandBuffer']['lastProgressTime'] >= 2.0:
 | 
			
		||||
                self.env['runtime']['debug'].writeDebugOut("Playing activity beep for transfer progress", debug.debugLevel.INFO)
 | 
			
		||||
 
 | 
			
		||||
@@ -45,28 +45,17 @@ class driver(remoteDriver):
 | 
			
		||||
                continue
 | 
			
		||||
            if self.fenrirSock in r:
 | 
			
		||||
                client_sock, client_addr = self.fenrirSock.accept()
 | 
			
		||||
            response = "ERROR: Failed to process command\n"
 | 
			
		||||
            try:
 | 
			
		||||
                rawdata = client_sock.recv(8129)
 | 
			
		||||
                data = rawdata.decode("utf-8").rstrip().lstrip()
 | 
			
		||||
                if 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:
 | 
			
		||||
                pass
 | 
			
		||||
            
 | 
			
		||||
            try:
 | 
			
		||||
                data = rawdata.decode("utf-8").rstrip().lstrip()
 | 
			
		||||
                eventQueue.put({"Type":fenrirEventType.RemoteIncomming,
 | 
			
		||||
                    "Data": data
 | 
			
		||||
                })
 | 
			
		||||
            except:
 | 
			
		||||
                pass
 | 
			
		||||
            try:
 | 
			
		||||
                client_sock.close()
 | 
			
		||||
            except:
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user