Commit graph

3387 commits

Author SHA1 Message Date
Jack251970
a99b8399fe Improve code quality 2026-02-21 14:51:20 +08:00
DB P
7e9a626891 style: fix indentation and tab spacing 2026-02-20 17:40:27 +09:00
DB P
cecd90e675 Refactor: Improve power action logic and property setter
- Add braces for better readability in shutdown/reboot logic (Main.cs).
- Prevent redundant OnPropertyChanged calls in _skipPowerActionConfirmation setter (Settings.cs).
2026-02-20 17:34:37 +09:00
DB P
2d7d025682 Add Skip logic in command 2026-02-20 17:18:21 +09:00
DB P
12fc597b56 Add Checkbox for Skip Confirm 2026-02-20 17:06:31 +09:00
dependabot[bot]
498913e71d
Bump Microsoft.Data.Sqlite from 10.0.2 to 10.0.3
---
updated-dependencies:
- dependency-name: Microsoft.Data.Sqlite
  dependency-version: 10.0.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-02-10 22:45:10 +00:00
dependabot[bot]
0f829d0b91
Bump SkiaSharp from 3.119.1 to 3.119.2
---
updated-dependencies:
- dependency-name: SkiaSharp
  dependency-version: 3.119.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-02-10 01:07:13 +00:00
Jack251970
d4f472a64e Update AdjustTokenPrivileges PInvoke usage
Refactored the AdjustTokenPrivileges call to use null for the previous state and an out variable for the return length, improving compatibility with the PInvoke signature and aligning with recommended usage.
2026-02-05 20:28:37 +08:00
dependabot[bot]
97d7eab1a7
Bump Microsoft.Windows.CsWin32 from 0.3.205 to 0.3.269
---
updated-dependencies:
- dependency-name: Microsoft.Windows.CsWin32
  dependency-version: 0.3.269
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: Microsoft.Windows.CsWin32
  dependency-version: 0.3.269
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: Microsoft.Windows.CsWin32
  dependency-version: 0.3.269
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-02-04 22:46:23 +00:00
Jack Ye
ca5f5cf0e3
Merge pull request #4206 from Flow-Launcher/copilot/fix-calculator-thousands-separator
Add setting to disable thousands separator in Calculator plugin
2026-01-17 20:17:41 +08:00
VictoriousRaptor
befcc9b37c
Update Plugins/Flow.Launcher.Plugin.Calculator/Languages/en.xaml 2026-01-17 19:59:47 +08:00
Jack Ye
d72a15937d
Merge branch 'dev' into dependabot/nuget/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Microsoft.Data.Sqlite-10.0.2 2026-01-14 21:17:51 +08:00
dependabot[bot]
98bb98c265
Bump Microsoft.Data.Sqlite from 10.0.1 to 10.0.2
---
updated-dependencies:
- dependency-name: Microsoft.Data.Sqlite
  dependency-version: 10.0.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-01-13 22:45:07 +00:00
dependabot[bot]
ed83da5669
Bump Svg.Skia from 3.4.0 to 3.4.1
---
updated-dependencies:
- dependency-name: Svg.Skia
  dependency-version: 3.4.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-01-13 03:05:02 +00:00
copilot-swe-agent[bot]
649b142b46 Add UseThousandsSeparator setting to Calculator plugin
Co-authored-by: Jack251970 <53996452+Jack251970@users.noreply.github.com>
2026-01-10 06:30:57 +00:00
Jack251970
382a77d2c5 Fix ShellPath directory for shell path selection
Updated OpenShellPath to use Settings.ShellPath directory when prompting for a file path, ensuring the dialog opens in the relevant location instead of the editor path directory.
2026-01-07 13:40:13 +08:00
dependabot[bot]
77b631be87
Bump Svg.Skia from 3.2.1 to 3.4.0
---
updated-dependencies:
- dependency-name: Svg.Skia
  dependency-version: 3.4.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-01-05 22:08:44 +00:00
Jack251970
6c1c9fe600 Use wrap panel 2026-01-04 23:45:13 +08:00
Jack251970
af9050c34b Test no PrivateAssets 2026-01-04 23:19:41 +08:00
Jack251970
4c46e16160 Fix possible convert issue 2026-01-04 23:19:12 +08:00
Jack251970
590b4c82d2 Try NumberBox 2026-01-04 23:00:24 +08:00
Nilvan Lopes
669f3ef404
Update Plugins/Flow.Launcher.Plugin.WebSearch/Languages/en.xaml
Co-authored-by: VictoriousRaptor <10308169+VictoriousRaptor@users.noreply.github.com>
2026-01-03 11:14:20 -03:00
Nilvan Lopes
4c7cbadc2f remove the language files other than the en.xaml 2026-01-02 23:07:29 -03:00
Nilvan Lopes
2176553b26 Add max suggestions setting for web search plugins
Introduced a MaxSuggestions property (min 1, max 10) to control the number of autocomplete suggestions shown in web search plugins. Updated the UI to allow user configuration and added localized labels for the new setting in all supported languages. Suggestions in results are now limited according to this setting.
2026-01-02 14:32:44 -03:00
VictoriousRaptor
b062fc056f Catch exceptions and release com objects 2026-01-02 12:23:05 +08:00
VictoriousRaptor
3e32fca356 Fix localized name get failure 2026-01-02 01:47:44 +08:00
Jeremy Wu
ffb37d3e12
New Crowdin updates (#4127) 2025-12-25 17:06:56 +08:00
Jack Ye
bb1dfcde9b
Fix hide item option not working in Program plugin (#4141) 2025-12-25 07:01:47 +02:00
dependabot[bot]
b4ec480405
Bump Microsoft.Data.Sqlite from 10.0.0 to 10.0.1
---
updated-dependencies:
- dependency-name: Microsoft.Data.Sqlite
  dependency-version: 10.0.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-12-17 22:07:00 +00:00
Diego Henrique
9066913710
[FEATURE] Folder and File Action Keywords (#4093) 2025-12-14 12:18:21 +02:00
Jack Ye
a49eb464c8
Merge pull request #4129 from Flow-Launcher/dependabot/nuget/Plugins/Flow.Launcher.Plugin.Calculator/Mages-3.0.1
Bump Mages from 3.0.0 to 3.0.1
2025-11-26 18:33:53 +08:00
Jack Ye
48f67b1886
Improve and fix query result update logic issue & provide access to exact query typed by user (#3502) 2025-11-26 21:15:12 +11:00
dependabot[bot]
ce4a37b292
Bump Mages from 3.0.0 to 3.0.1
---
updated-dependencies:
- dependency-name: Mages
  dependency-version: 3.0.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-25 22:35:13 +00:00
Jeremy Wu
533a58d083
New Crowdin updates (#4051) 2025-11-20 18:26:31 +08:00
dependabot[bot]
3492aac2c0
Bump Microsoft.Data.Sqlite from 9.0.10 to 10.0.0
---
updated-dependencies:
- dependency-name: Microsoft.Data.Sqlite
  dependency-version: 10.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-11 22:07:56 +00:00
Jack251970
2adbc334a2 Improve semaphore lock handling and code robustness
Added `lockAcquired` flags in `PluginsManifest.cs` and `Main.cs`
to ensure semaphore locks are only released if successfully
acquired, preventing potential runtime errors. Updated `finally`
blocks to conditionally release locks based on these flags.

Removed redundant cancellation check in `EverythingAPI.cs` to
simplify code, assuming cancellation is handled elsewhere. These
changes enhance reliability and maintainability of the codebase.
2025-11-07 15:30:07 +08:00
Jack251970
05c8dd2fe1 Remove unnecessary debug information 2025-11-06 20:48:41 +08:00
Jack251970
88fd1e56d0 Handle OperationCanceledException gracefully
Added a `catch` block for `OperationCanceledException` in
`PluginsManifest.cs` to ignore canceled operations. Updated
`EverythingAPI.cs` to use cancellation tokens with `_semaphore.WaitAsync`
and handle cancellations by exiting the method cleanly with `yield break`.
2025-11-06 20:47:54 +08:00
Jack251970
49f89e33b5 Make locking operations cancelable with tokens
Updated `_semaphore.WaitAsync` in `EverythingAPI.cs` to accept a `CancellationToken` and handle `OperationCanceledException` gracefully, returning `false` instead of propagating the exception.

Refactored locking mechanisms in `Main.cs` to use `CancellationToken` for `_win32sLock` and `_uwpsLock`. Added `try-catch` blocks to handle `OperationCanceledException` and ensure proper lock release. Methods now return `emptyResults` when operations are canceled.
2025-11-06 20:46:29 +08:00
Jack251970
d0a47c84b9 Clarify CancellationToken handling in comments
Updated comments to explain the rationale for not directly passing
CancellationToken to methods and instead checking
IsCancellationRequested within locks. This prevents unexpected
OperationCanceledException. Changes made in EverythingAPI.cs
(IsEverythingRunningAsync) and Main.cs (Win32 and UWP program
preparation). No functional changes to the code.
2025-11-06 15:39:19 +08:00
Jack251970
bfaff5cca5 Improve semaphore usage and logging clarity
Added comments in `EverythingAPI.cs` and `Main.cs` to explain
why `CancellationToken` is not directly passed to semaphore
locks, preventing unexpected `OperationCanceledException`.

Updated debug log messages in `Main.cs` for better clarity,
including changing "Start handling programs" to "Start querying
programs". Removed redundant log messages to improve logging
consistency.
2025-11-06 15:32:08 +08:00
Jack251970
30d7f67d42 Refactor token cancellation check for readability
Simplified the `if` statement that checks for token cancellation
by condensing it into a single line. This improves code readability
and eliminates unnecessary line breaks.
2025-11-06 15:30:32 +08:00
Jack251970
7e332fa615 Refactor caching and indexing logic
Added `ResetCache` calls after clearing `_win32s` and `_uwps` lists to ensure proper cache reset during indexing. Updated logic to return `resultList` after setting cache size and expiration for improved clarity. Removed `await Task.WhenAll` to adjust asynchronous flow in the indexing process.
2025-11-06 15:29:38 +08:00
Jack251970
3d8fd1d352 Improve cancellation, locking, and logging mechanisms
Enhanced cancellation handling by adding `token.IsCancellationRequested` checks to improve responsiveness. Refactored locking mechanisms for `_win32sLock` and `_uwpsLock` using `try-finally` blocks to ensure proper acquisition and release, improving thread safety and preventing deadlocks.

Reorganized Win32 and UWP program querying logic for better modularity and readability. Replaced shared collection access with local variables to improve clarity and maintain thread safety. Simplified empty result handling by directly returning `emptyResults` when canceled.

Removed redundant debug log statements to reduce verbosity and updated remaining logs for clarity. Suppressed unused result warnings by replacing direct calls to `EverythingApiDllImport.Everything_GetMajorVersion()` with null-coalescing assignments.
2025-11-06 15:28:13 +08:00
Jack251970
db0c86d50c Remove CancellationToken from semaphore WaitAsync calls
Removed the `CancellationToken` parameter from `WaitAsync` calls
on semaphores in `EverythingAPI.cs` and `Main.cs`. This change
eliminates cancellation support for semaphore waits, likely due
to a design decision prioritizing simplicity or avoiding issues
with cancellation handling.

In `EverythingAPI.cs`, `WaitAsync(token)` was replaced with
`WaitAsync()` in two methods. Similarly, in `Main.cs`, the
`WaitAsync` calls for `_win32sLock` and `_uwpsLock` were updated
to remove the `token` parameter.

Note: This change may impact the ability to gracefully handle
cancellation during semaphore waits.
2025-11-04 14:25:55 +08:00
Jack251970
6e17d5d756 Improve logging for Win32 program lock acquisition
Added a debug log statement to indicate when the lock for
querying Win32 programs is being acquired. This enhances
granularity in logging, making it easier to distinguish
between the acquisition of locks for Win32 and UWP programs.
Improves traceability and debugging of the program's
execution flow.
2025-11-04 12:27:59 +08:00
Jack251970
4cf942ac3a Add detailed debug logging for query execution process
Enhanced logging to provide better traceability and insights:
- Added debug logs for query reception, cache misses, and lock acquisition.
- Logged query cancellation and completion with result counts.
- Added logs for caching results, including item counts and query details.
- Improved logging for filtering and program selection processes.
- Ensured no functional changes to existing query and filtering logic.
2025-10-26 21:01:07 +08:00
Jack251970
f632a4b773 Add caching to QueryAsync and integrate cache reset logic
Introduced a MemoryCache to improve QueryAsync performance by
caching query results, reducing redundant computations. Added
a ResetCache method to reinitialize the cache when settings
are updated. Integrated cache reset calls into settings
property setters to ensure consistency.

Refactored query logic to leverage MemoryCache.GetOrCreateAsync
for streamlined caching. Removed redundant code and debug
logging for improved readability and maintainability. Ensured
thread safety with proper locking mechanisms. Simplified and
consolidated caching logic for better maintainability.
2025-10-26 20:59:29 +08:00
Jack251970
e2fa122362 Improve program indexing with logging and thread safety
Added detailed debug logging to `IndexWin32ProgramsAsync` and
`IndexUwpProgramsAsync` to track the indexing process, including
preparation, start, retrieval, caching, and completion.

Replaced direct updates to `_settings.LastIndexTime` with a
thread-safe lock to prevent race conditions.

Enhanced `IndexProgramsAsync` with a debug log to indicate the
start of indexing for better traceability.

Updated program retrieval logic to process Win32 and UWP programs
in parallel with cancellation support and applied the
`HideUninstallersFilter` for cleaner results.
2025-10-26 20:56:08 +08:00
Jack251970
6a65f8090f Enhance thread safety and refactor reindexing logic
Introduced `_lastIndexTimeLock` to ensure thread-safe access
and updates to `_settings.LastIndexTime`, preventing race
conditions. Refactored reindexing logic to use a `lock` block
for evaluating and updating the reindexing condition.

Added `emptyResults` as a static readonly placeholder list.
Improved code clarity and maintainability without altering
existing functionality.
2025-10-26 20:51:08 +08:00