@@ -31,7 +31,6 @@ function initializeIdleFilePath() {
3131 updateLastActivityTimestamp ( )
3232}
3333
34-
3534/**
3635 * Registers event listeners to monitor user activity within the VSCode editor.
3736 * It listens to document changes, editor focus changes, text selection changes, and terminal events.
@@ -67,13 +66,13 @@ const startMonitoringTerminalActivity = () => {
6766
6867/**
6968 * Checks for terminal activity by reading the /dev/pts directory and comparing modification times of the files.
70- *
69+ *
7170 * 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
7574 * times of the files in the /dev/pts directory, we can detect terminal activity.
76- *
75+ *
7776 * If activity is detected (i.e., if any PTY device file was modified within the CHECK_INTERVAL), this function
7877 * updates the last activity timestamp.
7978 */
@@ -92,7 +91,7 @@ const checkTerminalActivity = () => {
9291 const mtime = new Date ( stats . mtime ) . getTime ( ) ;
9392 return now - mtime < CHECK_INTERVAL ;
9493 } catch ( error ) {
95- console . error ( `${ LOG_PREFIX } } Error reading file stats:` , error ) ;
94+ console . error ( `${ LOG_PREFIX } Error reading file stats:` , error ) ;
9695 return false ;
9796 }
9897 } ) ;
@@ -103,7 +102,7 @@ const checkTerminalActivity = () => {
103102 } ) ;
104103} ;
105104
106- /**
105+ /**
107106 * Updates the last activity timestamp by recording the current timestamp in the idle file and
108107 * refreshing the status bar. The timestamp should be in ISO 8601 format and set to the UTC timezone.
109108 */
0 commit comments