Skip to content

Conversation

@jgadsden
Copy link
Collaborator

@jgadsden jgadsden commented Dec 8, 2025

Summary:
This is an implementation of proposing threats for a given threat model using generative AI
It is in draft form because it will probably evolve before it can be merged into the main branch

Description for the changelog:
AI extension for desktop

Declaration:

  • appropriate unit tests have been created / modified
  • functional tests created / modified for changes in functionality
  • any use of AI has been declared in this pull request

Other info:
This is a draft pull request to allow comment and further refinement

…guage files.

Add/update translations to AI Tools menu items in all language files:
  * Arabic (ar)
  * German (de)
  * Greek (el)
  * English (en)
  * Spanish (es)
  * Finnish (fi)
  * French (fr)
  * Hindi (hi)
  * Indonesian (id)
  * Japanese (ja)
  * Malay (ms)
  * Portuguese (pt)
  * Russian (ru)
  * Ukrainian (uk)
  * Chinese (zh)
- Created AI Settings window with form inputs for API configuration
- Implemented secure credential storage using keytar (OS credential manager)
  - API KEY stored in Windows Credential Manager/macOS Keychain/Linux Secret Service
  - Other settings (LLM Model, Temperature, Response Format, API Base, Log Level) stored in JSON file
- Implemented masked API key field with eye icon toggle for show/hide
- Added help icons (i) with toggleable descriptions for each setting
- Implemented unsaved changes warning dialog for both Close button and X button
- Window is resizable (down to 100x100, up to 620x660 default/max size)
- Window supports horizontal and vertical scrolling when resized smaller
- Settings window remains open after saving for continued editing
- Styling: gray help icons, gray Save button, consistent UI design

The settings window is accessible via AI Tools > Settings menu and fully functional.
Changes to be committed:
	modified:   td.vue/ai-tools/prompt.txt
	modified:   td.vue/ai-tools/src/ai_client.py
	modified:   td.vue/ai-tools/src/main.py
	modified:   td.vue/ai-tools/src/utils.py
	modified:   td.vue/public/preload.js
	modified:   td.vue/src/desktop/desktop.js
	modified:   td.vue/src/desktop/menu.js
	modified:   td.vue/src/main.desktop.js
	modified:   td.vue/ai-tools/src/ai_client.py
	modified:   td.vue/ai-tools/src/main.py
	modified:   td.vue/ai-tools/src/utils.py
	modified:   td.vue/ai-tools/src/validator.py
	modified:   td.vue/public/preload.js
	modified:   td.vue/src/desktop/menu.js
	modified:   td.vue/src/main.desktop.js
…reat model edit

	modified:   td.vue/src/main.desktop.js
	new file:   td.vue/public/ai-threats-progress.html
	modified:   td.vue/src/desktop/menu.js
	modified:   td.vue/ai-tools/src/ai_client.py
	modified:   td.vue/ai-tools/src/main.py
	modified:   td.vue/ai-tools/src/utils.py
	modified:   td.vue/public/ai-threats-progress.html
	new file:   td.vue/public/ai-threats-results.html
	modified:   td.vue/src/desktop/menu.js
Changes to be committed:
	modified:   td.vue/public/ai-settings.html
	modified:   td.vue/public/ai-threats-progress.html
	modified:   td.vue/public/ai-threats-results.html
	modified:   td.vue/public/ai-threats-warning.html
 modified:   td.vue/ai-tools/README.md
@jgadsden jgadsden added enhancement New feature or request discussion labels Dec 8, 2025
@jgadsden
Copy link
Collaborator Author

jgadsden commented Dec 8, 2025

the workflows will need venv installed (probably) once the package-lock.json files are resolved

@jgadsden
Copy link
Collaborator Author

jgadsden commented Dec 9, 2025

@lreading this is an extension to the TD desktop to integrate tools into the application
it is implementing discussion AI-Powered Threat Modelling Extension #1358
deliberately it is desktop only for the moment, putting this agentic AI into the web app might probably needs to be threat modeled in itself

@jgadsden
Copy link
Collaborator Author

jgadsden commented Dec 9, 2025

we will probably go with a new branch, but in the meantime I will make some changes to this one to see what is needed for building on Linux
the td.vue/package.json file has changed so the td.vue/package-lock.json needs to be updated as well

@jgadsden
Copy link
Collaborator Author

closing this in favor of pull request #1404

@jgadsden jgadsden closed this Dec 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

discussion enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants