This pull request introduces a new command to reset the state of the "Readme Auto Open" extension and ensures that the README file is only shown once per workspace session unless the state is reset. The most important changes include adding the new command to the package.json file and updating the extension's activation logic to handle the new state.
New command addition:
package.json: Added a new command readmeAutoOpen.resetState to the contributes section, which allows users to reset the state of the README auto-open feature.
State management and command registration:
src/extension.ts: Introduced a new constant readmeStateKey to manage the state indicating whether the README has been seen.
src/extension.ts: Updated the activate function to check the state and set it once the README is shown, ensuring the README is only opened once per session.
src/extension.ts: Added a new function registerResetStateCommand to register the readmeAutoOpen.resetState command, which resets the state and informs the user.
This pull request introduces a new command to reset the state of the "Readme Auto Open" extension and ensures that the README file is only shown once per workspace session unless the state is reset. The most important changes include adding the new command to the
package.json
file and updating the extension's activation logic to handle the new state.New command addition:
package.json
: Added a new commandreadmeAutoOpen.resetState
to thecontributes
section, which allows users to reset the state of the README auto-open feature.State management and command registration:
src/extension.ts
: Introduced a new constantreadmeStateKey
to manage the state indicating whether the README has been seen.src/extension.ts
: Updated theactivate
function to check the state and set it once the README is shown, ensuring the README is only opened once per session.src/extension.ts
: Added a new functionregisterResetStateCommand
to register thereadmeAutoOpen.resetState
command, which resets the state and informs the user.Resolves https://github.com/sander1095/vscode-readme-auto-open/issues/3