TidGi is an privatcy-in-mind, automated, auto-git-backup, freely-deployed Tiddlywiki knowledge management Desktop note app, with local REST API. 「 太记 」是一个基于「 太微 TiddlyWiki 」的知识管理桌面应用,能保护隐私内容、高级自动化、自动Git云备份、部署为博客,且可通过RESTAPI与Anki等应用连接。(迭代开发中欢迎试用,开发进度见下方链接)(Under active development, see website below for details)
Find a file
lin onetwo 64cc965a4a
Feat/discuss note with agent (#685)
* Add wiki tiddler attachment support to agent chat

Implements the ability to attach wiki tiddlers to agent chat messages. Updates the UI to allow selection of tiddlers from active wiki workspaces, fetches and renders tiddler content as plain text, and appends it to the user message sent to the AI. Includes e2e tests, updates to store actions, service interfaces, and prompt concatenation logic to support this feature.

* fix: callback not useCallback cause autocomplete panel flash

* Add wiki tiddler attachments to message bubbles

Message bubbles now display attached wiki tiddlers as clickable chips, allowing users to navigate directly to the referenced tiddler in the appropriate workspace. Metadata handling and persistence for wiki tiddlers has been updated to include workspaceId, and tests have been added to verify the new UI behavior. The chat view also now closes the TiddlyWiki sidebar for better focus when navigating from a selection.

* Support split view navigation for wiki tiddler attachments

Adds isSplitView prop to ChatTabContent and related components to distinguish between split view and normal tab modes. Wiki tiddler attachment navigation now uses a different strategy in split view, opening tiddlers directly in the browser view. Updates types and tests to reflect the new behavior, and improves robustness of response handling in several places.

* docs: move to .github/instructions/testing.instructions.md

* test: view loading slow on mac

* refactor(e2e): move wiki load steps to Background in talkWithAI.feature; remove all sidebar close delays and polling, only set state when TiddlyWiki is ready; clean up code and logs for sidebar auto-close in split view

* docs: make test inst shorter

* lint

* refactor(view): slim ViewService, move menu to separate file, orchestrate view logic in WorkspaceViewService, update all callers, fix lint floating promise, all unit and e2e tests pass

* fix: add data-testid to attachment listbox for E2E test

- Add slotProps to MUI Autocomplete to ensure attachment-listbox is rendered with correct test-id
- Fix E2E test timeout when waiting for attachment listbox element

* lint

* put 'Talk with AI' menu on top and attachment i18n

Introduce a reusable createTalkWithAIMenuItems helper to build "Talk with AI" menu entries (default agent + other agents submenu) and integrate it into workspace menu generation. Add new i18n keys for Agent.Attachment and WikiEmbed across locales and update UI to use translation keys (remove hardcoded fallback strings). Improve chat input/attachment behavior: expose a test-id for the attachment listbox, use i18n for labels/placeholders, and tweak input component wiring. Fix Cucumber step handling by normalizing expected newline sequences and safely handling empty message content. Also adjust memo deps in SortableWorkspaceSelectorButton to include id.

* feat: enhance AI interaction in workspace context menu with local trigger support

* feat: add tool approval and timeout settings

- Introduced ToolApprovalConfig and related types for managing tool execution approvals.
- Implemented WebFetch and ZxScript tools for fetching web content and executing scripts, respectively.
- Added token estimation utilities for context window management.
- Enhanced ModelInfo interface with context window size and max output tokens.
- Created API Retry Utility for handling transient failures with exponential backoff.
- Updated AIAgent preferences section to include Tool Approval & Timeout Settings dialog.
- Developed ToolApprovalSettingsDialog for configuring tool-specific approval rules and retry settings.
- Modified vitest configuration to support aliasing for easier imports and stubbing.

* Refactor agent instance tools and services for improved modularity and maintainability

- Extracted type definitions and tool registry from defineTool.ts into separate files (defineToolTypes.ts, toolRegistry.ts) to reduce file size and enhance importability.
- Implemented a retry mechanism in ExternalAPIService for stream creation to handle transient failures.
- Updated ToolApprovalSettingsDialog to persist settings using localStorage instead of a preference service.
- Created agentMessagePersistence.ts and agentRepository.ts to manage agent message and instance CRUD operations, reducing the size of AgentInstanceService.
- Added a progress tracker document (AgentTODO.md) for the ongoing enhancement plan of the TidGi Agent.

* feat: add AgentSwitcher component for agent definition switching

- Implemented AgentSwitcher component with dropdown functionality for selecting agent definitions.
- Integrated loading of agent definitions on dropdown open.
- Added visual feedback for current selection and disabled state.

feat: create ToolResultRenderer for generic tool result messages

- Developed ToolResultRenderer to handle rendering of <functions_result> messages.
- Included collapsible parameters and result display with error handling.
- Added truncation for long results in collapsed view.

test: add comprehensive tests for MessageRenderer components

- Implemented tests for AskQuestionRenderer, ToolResultRenderer, ToolApprovalRenderer, and BaseMessageRenderer.
- Ensured proper rendering and functionality for various message types and states.
- Included pattern routing tests for MessageRenderer.

feat: introduce TurnActionBar for action management in agent turns

- Created TurnActionBar component for managing actions like rollback, retry, delete, and copy.
- Integrated visual feedback for file changes and rollback status.
- Added functionality for copying agent responses and full conversation to clipboard.

feat: implement askQuestionPending for managing user responses

- Developed infrastructure for handling pending ask-question requests.
- Implemented promise-based blocking until user responds to agent questions.
- Added timeout handling for ask-question requests.

* feat: Implement background task management for agent instances

- Added functionality to restore heartbeat timers and alarms for active agents upon service initialization.
- Introduced methods to retrieve active background tasks and cancel them via the UI.
- Enhanced alarm clock tool to persist alarm data in the database, ensuring alarms survive app restarts.
- Updated agent instance schema to include scheduled alarm data.
- Modified prompt concatenation logic to support context window size for message history.
- Removed system prompt parameter from model parameters schema and related components.
- Improved UI to display and manage background tasks, including heartbeat and alarm details.

* feat: Implement Scheduled Tasks Management and Background Task Settings

- Add feature for managing scheduled tasks for agents, including viewing, adding, and editing tasks.
- Create tests for agent repository and background task settings APIs.
- Introduce ScheduledTaskManager for unified scheduling of tasks with interval, at, and cron schedules.
- Implement edit-agent-definition tool for modifying agent configurations, including heartbeat and prompt settings.
- Ensure tasks persist across app restarts and respect active hours filtering.

* Update wiki

* fix(security): harden htmlToText against XSS via encoded tags

- Use tolerant script/style regex that handles </script > with spaces
- Stop decoding &lt;/&gt; entities to prevent reintroducing HTML tags
- Decode &amp; last to avoid double-unescaping (&amp;lt;  &lt;  <)
- Fixes all 4 CodeQL findings (bad filtering, incomplete sanitization,
  double escaping, incomplete multi-character sanitization)

* fix: lint and format errors (eslint naming, dprint formatting, stub classes)

* fix: exclude tidgi.config.json from template copy and fix log marker pattern

- Skip tidgi.config.json when copying wiki template to prevent overriding workspace name
- Change waitForLogMarker default pattern from 'wiki-' to '*' to match actual log filenames
- Filter tidgi.config.json in e2e step too (fs.copy in wiki creation step)

* perf(e2e): merge 5 scheduledTask scenarios into 2 to reduce app restarts

* perf(e2e): merge crossWindowSync and streamingStatus scenarios to reduce CI time

* ci: increase test timeout to 20min for larger e2e scenario count

* perf(e2e): merge agent scenarios and enable parallel on CI

- Merge agent.feature wiki-search + wiki-operation into one scenario
- Merge agent.feature create-agent-from-newtab + create-agent-from-fallback into one
- Enable cucumber parallel: 2 on CI (7GB RAM, dynamic ports for mock servers)
- Total scenarios: 66 -> 61

* fix: cleanup MCP client processes when deleting or closing agent

* ci: disable parallel (CPU contention), increase timeout to 30min for 61 scenarios

* perf(e2e): merge 3 preference background-task scenarios into 1, increase timeout to 45min

- Preference alarm/heartbeat CRUD merged into single scenario (saves 2 app restarts)
- Total scenarios: 59 (was 66)
- CI timeout 45min for the expanded e2e suite

* fix: restructure e2e scenarios, fix subscription leak and debounce cleanup

- Restructure agent/talkWithAI/streamingStatus feature files for reliability
- Fix talkWithAI scenarios missing mock server startup and app launch
- Remove duplicate subscription in handleSwitchAgent (useEffect already handles it)
- Clean up debounced update functions when agent is deleted/closed
- Use agentId:messageId key for debounced functions to enable per-agent cleanup

* fix(e2e): remove :last-child selectors broken by TurnActionBar, fix tab/dialog selectors, increase CI timeout to 25min

* fix: use const for non-reassigned variable (lint)

* fix(e2e): fix close-all-tabs opacity issue, scheduledTask undefined steps, MUI multiline textarea targeting

* fix(e2e): use tab-list-dropdown to close all tabs, fix selector for actual TabListDropdown component

* fix(e2e): add timing waits for BrowserView repositioning and git log UI refresh

* fix(e2e): make 'should not see' step wait for element to disappear instead of instant check

* fix(e2e): increase executeInBrowserView default timeout from 500ms to 2000ms
2026-03-09 04:07:39 +08:00
.github Feat/discuss note with agent (#685) 2026-03-09 04:07:39 +08:00
.vscode Fix/sync sub wiki (#672) 2025-12-17 22:08:26 +08:00
build-resources Feat/mini window (#642) 2025-10-21 20:07:04 +08:00
docs Feat/discuss note with agent (#685) 2026-03-09 04:07:39 +08:00
features Feat/discuss note with agent (#685) 2026-03-09 04:07:39 +08:00
localization Feat/discuss note with agent (#685) 2026-03-09 04:07:39 +08:00
packages/tidgi-shared Expose TidGi services to $tw.tidgi and add types 2026-02-10 02:41:32 +08:00
patches Feat/Native AI Agent (#640) 2025-10-10 17:16:56 +08:00
scripts Fix workspaceID case bug, esbuild outbase, autocomplete panel re-render, VIEW_LOADED handler, streaming status polling, and increase executeInBrowserView timeout for E2E stability. All 52 scenarios pass 2026-02-21 12:36:58 +08:00
src Feat/discuss note with agent (#685) 2026-03-09 04:07:39 +08:00
template update templatw wiki 2026-03-07 15:34:02 +08:00
.editorconfig refactor: initial transform to ts 2020-12-19 22:33:59 +08:00
.env feat: add SKIP_PREFLIGHT_CHECK=true to skip silly react check 2020-08-22 19:36:24 +08:00
.gitattributes Create .gitattributes 2021-07-08 23:23:59 +08:00
.gitignore Fix/misc bug (#677) 2026-01-20 11:11:28 +08:00
.gitmodules refactor: make template wiki a git submodule 2021-09-09 00:16:43 +08:00
.npmrc Feat/Native AI Agent (#640) 2025-10-10 17:16:56 +08:00
.nvmrc chore: upgrade deps 2024-11-24 16:59:21 +08:00
.pnpmfile.cjs Feat/Native AI Agent (#640) 2025-10-10 17:16:56 +08:00
dprint.json fix: dprint conflict 2023-05-19 11:06:29 +08:00
eslint.config.mjs Feat/discuss note with agent (#685) 2026-03-09 04:07:39 +08:00
forge.config.ts Fix/start error (#654) 2025-11-20 17:17:11 +08:00
forge.env.d.ts Feat/Native AI Agent (#640) 2025-10-10 17:16:56 +08:00
index.html Feat/Native AI Agent (#640) 2025-10-10 17:16:56 +08:00
LICENSE Initial 2019-08-30 11:41:23 +07:00
package.json Feat/discuss note with agent (#685) 2026-03-09 04:07:39 +08:00
pnpm-lock.yaml Feat/discuss note with agent (#685) 2026-03-09 04:07:39 +08:00
pnpm-workspace.yaml feat: publish tidgi-shared npm for types, and place tidgi.service 2026-02-09 23:16:49 +08:00
PrivacyPolicy.md refactor: rename tiddlygit to tidgi in code 2021-12-18 13:16:26 +08:00
README.md Feat/Native AI Agent (#640) 2025-10-10 17:16:56 +08:00
reviewpad.yml feat: add reviewpad.yml file 2023-07-04 20:29:50 +08:00
tsconfig.json Feat/allow watch fs change on git sync 2025-10-31 02:00:40 +08:00
tsconfig.test.json Feat/Native AI Agent (#640) 2025-10-10 17:16:56 +08:00
vite.main.config.ts Feat/discuss note with agent (#685) 2026-03-09 04:07:39 +08:00
vite.preload.config.ts Feat/Native AI Agent (#640) 2025-10-10 17:16:56 +08:00
vite.renderer.config.ts Fix/edit agent and several bugs (#670) 2025-12-15 17:33:59 +08:00
vite.worker.config.ts Feat/Native AI Agent (#640) 2025-10-10 17:16:56 +08:00
vitest.config.ts Feat/discuss note with agent (#685) 2026-03-09 04:07:39 +08:00

TidGi

Customizable personal knowledge-base with git as backup manager and blogging platform.

License: MPL 2.0 GitHub Actions Build Status Lin Onetwo! Power by tiddlywiki!


Pronounce: Same as Tai Chi /ˌtaɪ ˈtʃiː/

🇬🇧 English | 🇨🇳 简体中文

ShowCases And Demo

Demo

Screenshot

Screenshot of main-window

Load NodeJS Wiki
Screenshot of main-window
Create Local Wiki Clone Online Wiki
Screenshot of add-workspace Screenshot of clone-workspace
Translation, Preferences
Screenshot of preference
Interactive code
Screen recording of zx-script in tiddlywiki
Community Plugin Library
Screenshot of add-workspace
For mac users, since I haven't buy Apple developer key yet, so you have to entrust App to open it, click here to expand details.◀

First of all, you need to drag this App into Applications folder! Otherwise there will be an error.

Click "Cancel" ↓

step00001

step00002

step00003

Click "Open" ↓

step00004

Click "OK" ↓

step00005

No English posts yet...Please help sharing!

About TidGi-Desktop

TidGi is a cross-platform Note Taking & GTD & Fragment Knowledge Management desktop app powered by nodejs-TiddlyWiki, it ship with a lot of tiddlywiki plugins from the TiddlyWiki community.

You can call it TG-Note, it is totally free and you own all your data. Code by the people, build for the people.

It used to named TiddlyGit, means TiddlyWiki with easy Git backup, short for TidGi now.

Download

Packaging status

For Windows MacOS normal user

Download
GitHub Releases

For arch user

yay tidgi

For MacOS CLI user

brew install TidGi # Not tested

Mobile App

  • TidGi-Mobile is the official pair with TidGi-Desktop, developed by @linonetwo, fast for 100MB+ wiki.
  • See Tiddloid for Android App developed by @donmor. Good for smaller wiki, and you can have access to your HTML wiki.

You can switch between them, and sync data between them and TidGi at any time. All of them are local-first, open-sourced and compatible with TiddlyWiki ecosystem.

Data Privacy Protection

You can choose storage provider for your wiki workspace:

  1. "Github" as unlimited storage and gh-pages blogging platform.
  2. "Local" will create a local git repo for you, you can use GithubDesktop to sync manually.
  3. "Gitlab" and "Gitee" is on the way

Differences

Differences from TiddlyDesktop?

  1. NodeJS version of TiddlyWiki have seamless auto-save experience, which is taking the advantage of SyncAdaptor instead of Saver, TG have better support for NodeJS wiki
  2. Using NodeJS wiki, We can have separated tiddler files, which can be modified by hand, or by other programs (e.g. VSCode with VSCode-TW5-Syntax)
  3. Though TiddlyDesktop can also load wiki folder generated by nodejs-TiddlyWiki, TG can backup that folder to the Github easily
  4. With the Electron technology, we can use fs, git and many other nodejs things within TiddlyWiki, which greatly extend the hackability, which is the reason why I choose TiddlyWiki as my daily KM tool

Why Github?

Because Github is one of the best free civil level BaaS:

  1. Its storage is basically free, allow us to store unlimited images and PDF files, which can have permanent URIs for public download
  2. It has GraphQL API that allow us programmatically update our wiki
  3. It has free CI to automatically deploy our TiddlyWiki blog
  4. It provides unlimited repository, public and private, which enables us to store private content into our TiddlyWiki

Development

Read Dev doc for details.

Credits

The desktop app shell is based on https://github.com/atomery/singlebox and atomery/webcatalog, they provide lots of utils around website-generated-app, much powerful than generating app from website simply using Chrome. Also the independent developer @quanglam2807 behind these great tools helps me a lot when I develop TidGi.

Current Icon is download from iconsdb under Creative Commons Attribution-NoDerivs 3.0 , if you are a designer, please feel free to contribute your ICON if you have a better idea.

Stargazers over time

Please give a star if you like it!

Stargazers over time