-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: initial implementation of session time counter extension #16
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking like a good start. Question: why put it in extensions/*
? This entire thing is one extension.
@@ -0,0 +1,20 @@ | |||
/**@type {import('eslint').Linter.Config} */ | |||
// eslint-disable-next-line no-undef |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this needed? Seems odd in the eslint config itself.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While I was working on this PR, I have used their official vscode repo as a source on how to do this. They have nice documentation and samples.
This particular lines in eslint config were from the base files of their hello world sample in here.
|
||
const interval = setInterval(() => { | ||
updateSesstionTime(); | ||
currentSessionTimeItem.text = (sessionTime / 1000).toFixed(0) + " seconds"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's use https://www.npmjs.com/package/ms to do this
I saw the official vscode repo to put some extensions in extensions folder. I am not sure what could be a good design but maybe having single |
Resolves #11
I have added the initial implementation to measure active window time for current session for the user. You can investigate
extensions/session-time-counter/src/extension.ts
to see my implementation.During the process I had such questions like;
As we build this extension maybe we need to clarify these crucial questions and file corresponding issues to help with the development process.
Let me know what you think 🤩