@@ -31,7 +31,6 @@ function initializeIdleFilePath() {
31
31
updateLastActivityTimestamp ( )
32
32
}
33
33
34
-
35
34
/**
36
35
* Registers event listeners to monitor user activity within the VSCode editor.
37
36
* It listens to document changes, editor focus changes, text selection changes, and terminal events.
@@ -67,13 +66,13 @@ const startMonitoringTerminalActivity = () => {
67
66
68
67
/**
69
68
* Checks for terminal activity by reading the /dev/pts directory and comparing modification times of the files.
70
- *
69
+ *
71
70
* The /dev/pts directory is used in Unix-like operating systems to represent pseudo-terminal (PTY) devices.
72
- * Each active terminal session is assigned a PTY device. These devices are represented as files within the /dev/pts directory.
73
- * When a terminal session has activity, such as when a user inputs commands or output is written to the terminal,
74
- * the modification time (mtime) of the corresponding PTY device file is updated. By monitoring the modification
71
+ * Each active terminal session is assigned a PTY device. These devices are represented as files within the /dev/pts directory.
72
+ * When a terminal session has activity, such as when a user inputs commands or output is written to the terminal,
73
+ * the modification time (mtime) of the corresponding PTY device file is updated. By monitoring the modification
75
74
* times of the files in the /dev/pts directory, we can detect terminal activity.
76
- *
75
+ *
77
76
* If activity is detected (i.e., if any PTY device file was modified within the CHECK_INTERVAL), this function
78
77
* updates the last activity timestamp.
79
78
*/
@@ -92,7 +91,7 @@ const checkTerminalActivity = () => {
92
91
const mtime = new Date ( stats . mtime ) . getTime ( ) ;
93
92
return now - mtime < CHECK_INTERVAL ;
94
93
} catch ( error ) {
95
- console . error ( `${ LOG_PREFIX } } Error reading file stats:` , error ) ;
94
+ console . error ( `${ LOG_PREFIX } Error reading file stats:` , error ) ;
96
95
return false ;
97
96
}
98
97
} ) ;
@@ -103,7 +102,7 @@ const checkTerminalActivity = () => {
103
102
} ) ;
104
103
} ;
105
104
106
- /**
105
+ /**
107
106
* Updates the last activity timestamp by recording the current timestamp in the idle file and
108
107
* refreshing the status bar. The timestamp should be in ISO 8601 format and set to the UTC timezone.
109
108
*/
0 commit comments