Skip to content

feat: initialization - #2

Merged
cxxxxxn (cxxxxxn) merged 8 commits into
mainfrom
code
Dec 11, 2025
Merged

feat: initialization#2
cxxxxxn (cxxxxxn) merged 8 commits into
mainfrom
code

Conversation

@cxxxxxn

Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR introduces a new NVDA add-on called "AskEase" - an AI-powered screen assistant that helps visually impaired users understand and interact with their screen content. The add-on integrates with OpenAI's API to provide intelligent screen analysis, step-by-step guidance, and an interactive chat interface.

Key Changes:

  • Implements core AI screen assistant functionality with vision-based analysis and natural language interaction
  • Adds comprehensive build system using SCons with support for internationalization and add-on packaging
  • Includes Chinese (Simplified) localization with 339 translated strings

Reviewed Changes

Copilot reviewed 24 out of 25 changed files in this pull request and generated 14 comments.

Show a summary per file
File Description
site_scons/site_tools/gettexttool/init.py SCons tool for gettext localization support (msgfmt, xgettext)
sconstruct Main build script for add-on packaging, localization, and documentation generation
buildVars.py Add-on metadata and build configuration
manifest.ini.tpl / manifest-translated.ini.tpl Template files for add-on manifest generation
addon/globalPlugins/screenAssistant/init.py Main plugin entry point with gesture handling and screen recording
addon/globalPlugins/screenAssistant/helpDialog.py AI chat dialog UI with conversation history and settings
addon/globalPlugins/screenAssistant/settingsPanel.py NVDA settings panel for OpenAI API configuration
addon/globalPlugins/screenAssistant/openai_service.py OpenAI API integration and request handling
addon/globalPlugins/screenAssistant/addonConfig.py Configuration management with .env file support
addon/globalPlugins/screenAssistant/desktop/* Desktop state capture and screenshot functionality
addon/globalPlugins/screenAssistant/screenReader/* Screen reader action history tracking
addon/globalPlugins/screenAssistant/message/* Message list management for chat history
addon/globalPlugins/screenAssistant/prompt.py System prompts and prompt templates for AI
addon/locale/zh_CN/LC_MESSAGES/nvda.po Chinese (Simplified) translation file
README.md Comprehensive documentation for users and developers

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread buildVars.py Outdated
Comment thread sconstruct Outdated
Comment thread sconstruct Outdated
Comment thread addon/globalPlugins/screenAssistant/settingsPanel.py Outdated
Comment thread addon/globalPlugins/screenAssistant/settingsPanel.py Outdated
Comment thread addon/globalPlugins/screenAssistant/helpDialog.py
Comment thread addon/globalPlugins/screenAssistant/log.py
Comment thread addon/globalPlugins/screenAssistant/__init__.py
Comment thread addon/globalPlugins/screenAssistant/__init__.py
Comment thread addon/globalPlugins/screenAssistant/__init__.py

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 24 out of 25 changed files in this pull request and generated 13 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread addon/globalPlugins/screenAssistant/settingsPanel.py Outdated
Comment thread addon/globalPlugins/screenAssistant/settingsPanel.py
Comment thread addon/globalPlugins/screenAssistant/settingsPanel.py Outdated
Comment thread addon/globalPlugins/screenAssistant/string_utils.py Outdated
Comment thread addon/globalPlugins/screenAssistant/helpDialog.py Outdated
Comment thread addon/globalPlugins/screenAssistant/helpDialog.py
Comment thread sconstruct
Comment on lines +5 to +16
CSIDL_DESKTOPDIRECTORY = 0x0010 # Desktop folder
SHGFP_TYPE_CURRENT = 0
# logging chat history to desktop
LOGGING_ENABLED = False

def get_user_desktop_dir() -> str:
try:
buf = ctypes.create_unicode_buffer(wintypes.MAX_PATH)
ctypes.windll.shell32.SHGetFolderPathW(
0, CSIDL_DESKTOPDIRECTORY, 0, SHGFP_TYPE_CURRENT, buf
)
return buf.value

Copilot AI Dec 10, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The CSIDL_DESKTOPDIRECTORY constant and related Windows API usage is deprecated. Modern code should use FOLDERID constants with SHGetKnownFolderPath instead of CSIDL constants with SHGetFolderPathW. However, this is marked as low severity as the current implementation will still work.

Suggested change
CSIDL_DESKTOPDIRECTORY = 0x0010 # Desktop folder
SHGFP_TYPE_CURRENT = 0
# logging chat history to desktop
LOGGING_ENABLED = False
def get_user_desktop_dir() -> str:
try:
buf = ctypes.create_unicode_buffer(wintypes.MAX_PATH)
ctypes.windll.shell32.SHGetFolderPathW(
0, CSIDL_DESKTOPDIRECTORY, 0, SHGFP_TYPE_CURRENT, buf
)
return buf.value
# Modern Windows API constants for Desktop folder
FOLDERID_Desktop = ctypes.c_char_p(b"{B4BFCC3A-DB2C-424C-B029-7FE99A87C641}")
# logging chat history to desktop
LOGGING_ENABLED = False
def get_user_desktop_dir() -> str:
try:
# Setup for SHGetKnownFolderPath
from ctypes import POINTER, byref, windll, wintypes
REFKNOWNFOLDERID = ctypes.c_char_p
# SHGetKnownFolderPath prototype: HRESULT SHGetKnownFolderPath(REFKNOWNFOLDERID rfid, DWORD dwFlags, HANDLE hToken, PWSTR *ppszPath)
SHGetKnownFolderPath = windll.shell32.SHGetKnownFolderPath
SHGetKnownFolderPath.argtypes = [REFKNOWNFOLDERID, wintypes.DWORD, wintypes.HANDLE, POINTER(ctypes.c_wchar_p)]
SHGetKnownFolderPath.restype = wintypes.HRESULT
path_ptr = ctypes.c_wchar_p()
result = SHGetKnownFolderPath(FOLDERID_Desktop, 0, 0, byref(path_ptr))
if result != 0:
raise OSError("SHGetKnownFolderPath failed")
desktop_path = path_ptr.value
# Free the memory allocated for the path
windll.Ole32.CoTaskMemFree(path_ptr)
return desktop_path

Copilot uses AI. Check for mistakes.
Comment thread addon/globalPlugins/screenAssistant/helpDialog.py Outdated
Comment thread addon/globalPlugins/screenAssistant/helpDialog.py
cxxxxxn (cxxxxxn) and others added 5 commits December 10, 2025 18:00
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@github-advanced-security

Copy link
Copy Markdown

This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation.

@cxxxxxn
cxxxxxn (cxxxxxn) merged commit 9b62732 into main Dec 11, 2025
1 check passed
@cxxxxxn
cxxxxxn (cxxxxxn) deleted the code branch December 11, 2025 03:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants