- Replaced paragraph-based image rendering with the Widget trait
- Renamed `build_preview_paragraph` to `build_preview_widget`, returning an enum wrapper for rendering
- Updated image cache to store a grid of Ratatui `Cell` instead of text
- Implemented dedicated image rendering to eliminate text-based workarounds
- the more time consuming operation is in fact to open jpeg, tried to find more efficient way to open file than the default way of the image crate but nothing really worked
- removed warnings
- clean some part of the code
I tought the bottleneck of the performances issues was the resize so, I implemeneted that with fast_image_resize.
There were no good improvement, the problem most likely come from the the conversion rgb -> rgba for example.
Bumps
[softprops/action-gh-release](https://github.com/softprops/action-gh-release)
from 1 to 2.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/softprops/action-gh-release/releases">softprops/action-gh-release's
releases</a>.</em></p>
<blockquote>
<h2>v2.0.0</h2>
<ul>
<li>update actions.yml declaration to node20 to address warnings</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/softprops/action-gh-release/blob/master/CHANGELOG.md">softprops/action-gh-release's
changelog</a>.</em></p>
<blockquote>
<h2>0.1.12</h2>
<ul>
<li>fix bug leading to empty strings subsituted for inputs users don't
provide breaking api calls <a
href="https://redirect.github.com/softprops/action-gh-release/pull/144">#144</a></li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="c95fe14893"><code>c95fe14</code></a>
release 2.2.1</li>
<li><a
href="deddb09c64"><code>deddb09</code></a>
fix: big file uploads (<a
href="https://redirect.github.com/softprops/action-gh-release/issues/562">#562</a>)</li>
<li><a
href="33fcd69d45"><code>33fcd69</code></a>
chore: update error and warning messages for not matching files in files
fiel...</li>
<li><a
href="01050bd877"><code>01050bd</code></a>
chore(deps): bump <code>@types/node</code> from 22.10.2 to 22.10.5 (<a
href="https://redirect.github.com/softprops/action-gh-release/issues/569">#569</a>)</li>
<li><a
href="92dffe6c28"><code>92dffe6</code></a>
chore(deps): bump <code>@types/node</code> from 22.10.1 to 22.10.2 (<a
href="https://redirect.github.com/softprops/action-gh-release/issues/559">#559</a>)</li>
<li><a
href="7b4da11513"><code>7b4da11</code></a>
release 2.2.0</li>
<li><a
href="64f1fa19ef"><code>64f1fa1</code></a>
feat: read the release assets asynchronously (<a
href="https://redirect.github.com/softprops/action-gh-release/issues/552">#552</a>)</li>
<li><a
href="9e35a64dfd"><code>9e35a64</code></a>
chore(deps): bump prettier from 3.4.1 to 3.4.2 (<a
href="https://redirect.github.com/softprops/action-gh-release/issues/554">#554</a>)</li>
<li><a
href="92bc83c421"><code>92bc83c</code></a>
chore(deps): bump <code>@types/node</code> from 22.9.4 to 22.10.1 (<a
href="https://redirect.github.com/softprops/action-gh-release/issues/551">#551</a>)</li>
<li><a
href="09f0e37203"><code>09f0e37</code></a>
chore(deps): bump prettier from 3.3.3 to 3.4.1 (<a
href="https://redirect.github.com/softprops/action-gh-release/issues/550">#550</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/softprops/action-gh-release/compare/v1...v2">compare
view</a></li>
</ul>
</details>
<br />
[](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)
Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.
[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)
---
<details>
<summary>Dependabot commands and options</summary>
<br />
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)
</details>
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Before:
```toml
[shell_integration.commands]
# Add your commands here. Each key is a command that will trigger tv with the
# corresponding channel as value.
# Example: say you want the following prompts to trigger the following channels
# when pressing <CTRL-T>:
# `git checkout` should trigger the `git-branches` channel
# `ls` should trigger the `dirs` channel
# `cat` should trigger the `files` channel
#
# You would add the following to your configuration file:
# ```
# [shell_integration.commands]
# "git checkout" = "git-branch"
# "ls" = "dirs"
# "cat" = "files"
# ```
# environment variables
"export" = "env"
"unset" = "env"
# dirs channel
"cd" = "dirs"
"ls" = "dirs"
"rmdir" = "dirs"
# files channel
"cat" = "files"
"less" = "files"
"head" = "files"
"tail" = "files"
"vim" = "files"
"bat" = "files"
# git-diff channel
"git add" = "git-diff"
# git-branch channel
"git checkout" = "git-branch"
"git branch -d" = "git-branch"
# docker-images channel
"docker run" = "docker-images"
# gitrepos channel
"nvim" = "git-repos"
```
After
```toml
[shell_integration.channel_triggers]
# Add your channel triggers here. Each key is a channel that will be triggered
# by the corresponding commands.
# Example: say you want the following commands to trigger the following channels
# when pressing <CTRL-T>:
# `git checkout` should trigger the `git-branches` channel
# `ls` should trigger the `dirs` channel
# `cat` and `cp` should trigger the `files` channel
#
# You would add the following to your configuration file:
# ```
# [shell_integration.channel_triggers]
# "git-branches" = ["git checkout"]
# "dirs" = ["ls"]
# "files" = ["cat", "cp"]
# ```
"env" = ["export", "unset"]
"dirs" = ["cd", "ls", "rmdir"]
"files" = ["cat", "less", "head", "tail", "vim", "bat"]
"git-diff" = ["git add"]
"git-branch" = ["git checkout", "git branch -d"]
"docker-images" = ["docker run"]
"git-repos" = ["nvim"]
```
- New image.rs file in utils to convert images in usable array
- new accepted type of files in utils/files.rs
- the enum PreviewContent has now an Image entry to handle images
- conversion from image file to a usable paragraph into preview
- New image.rs file in utils to convert images in usable array
- new accepted type of files in utils/files.rs
- the enum PreviewContent has now an Image entry to handle images
- conversion from image file to a usable paragraph into preview