Commit Graph

1096 Commits

Author SHA1 Message Date
Kwaroran
243984d788 Add CharX-Jpeg 2025-02-02 07:49:08 +09:00
Kwaroran
25aa83877b Add reasoning effort 2025-02-01 09:05:07 +09:00
Kwaroran
3139eac739 Add paste post 2025-01-31 23:04:01 +09:00
Kwaroran
757a944686 Add inlayErrorResponse 2025-01-31 17:38:14 +09:00
Kwaroran
e8ec986f65 Add server backup 2025-01-30 13:50:16 +09:00
Kwaroran
338d1cfec2 Add models 2025-01-29 05:38:26 +09:00
Bo26fhmC5M
de9b9ed80c fix: ensure scrollToSelection works cross-browser in HypaV3 modal 2025-01-28 09:45:33 +09:00
Bo26fhmC5M
1c5ed2fe32 fix: remove instruct35 from HypaV3 supa model list
- Remove outdated model to improve summarization performance
2025-01-23 19:50:24 +09:00
Bo26fhmC5M
2d22e9da5c fix: support multiple search results within a single summary in HypaV3 modal 2025-01-22 23:49:22 +09:00
Bo26fhmC5M
22e4b3d07c feat: add search button in HypaV3 modal 2025-01-22 22:08:46 +09:00
Bo26fhmC5M
9877931d1e fix: improve contrast in HypaV3 modal 2025-01-21 09:17:03 +09:00
Bo26fhmC5M
463dcc66b1 fix: improve HypaV3 modal responsive for mobile 2025-01-21 00:26:51 +09:00
Bo26fhmC5M
e3d95107a3 fix: remove duplicate modal wrapper from HypaV3 modal 2025-01-20 12:41:47 +09:00
Bo26fhmC5M
deb1c7d667 fix: minor changes in HypaV3 modal 2025-01-19 22:48:10 +09:00
Bo26fhmC5M
6f6e4b925a refactor: minor changes 2025-01-19 19:41:59 +09:00
Bo26fhmC5M
cd65eaf400 feat: add process regex script option in HypaV3 modal 2025-01-19 18:05:11 +09:00
Bo26fhmC5M
28da23c9c3 feat: add HypaV2 to V3 conversion in HypaV3 modal 2025-01-19 14:05:35 +09:00
Bo26fhmC5M
9c052f9a1d feat: add cut-after button in HypaV3 summary header 2025-01-19 12:23:09 +09:00
Bo26fhmC5M
17b9e28041 feat: add settings button to HypaV3 modal header 2025-01-19 11:55:09 +09:00
Bo26fhmC5M
ec2dd091aa feat: add auto-scroll to translations in HypaV3 modal 2025-01-19 11:30:50 +09:00
Bo26fhmC5M
0e86d15c62 fix: resolve mobile dual-action translation in HypaV3 modal 2025-01-19 09:30:54 +09:00
Bo26fhmC5M
1b2ea2b15b fix: handle null case for firstMessage in HypaV3 modal 2025-01-18 14:16:50 +09:00
kwaroran
e073d66bca feat: improve HypaV3 (#721)
# PR Checklist
- [x] Have you checked if it works normally in all models? *Ignore this
if it doesn't use models.*
- [x] Have you checked if it works normally in all web, local, and node
hosted versions? If it doesn't, have you blocked it in those versions?
- [x] Have you added type definitions?

# Description
- feat: add translate button to HypaV3 modal
- feat: add dual-action translation (cached/regenerate) in HypaV3 modal
- Implements shift+click (desktop) and double tap (mobile) for
regenerating translations while maintaining regular click/tap for cached
translations.
- feat: improve ratio sliders interaction in HypaV3 settings
- feat: add lastSelectedSummaries property to store selected memory
indices
- feat: display next message to be summarized in HypaV3 modal
2025-01-17 22:54:08 +09:00
Bo26fhmC5M
b43eec49d1 fix: handle empty message edge cases in getNextMessageToSummarize 2025-01-17 09:03:23 +09:00
Bo26fhmC5M
171b267891 feat: display next message to be summarized in HypaV3 modal 2025-01-17 02:22:46 +09:00
Bo26fhmC5M
3c62317f3a feat: add lastSelectedSummaries property to store selected memory indices 2025-01-17 00:17:12 +09:00
Bo26fhmC5M
6a13b33103 refactor: extract repeated summarization logic into retryableSummarize function 2025-01-16 23:36:32 +09:00
Bo26fhmC5M
6ffaa1257e feat: improve ratio sliders interaction in HypaV3 settings 2025-01-16 22:12:32 +09:00
poroyo
0f19952e2a feat: add navigation from prompt comparison tooltip overview to prompt lines 2025-01-16 17:23:11 +09:00
Bo26fhmC5M
682f536c5a refactor: extract double confirmation logic into reusable function 2025-01-16 01:36:29 +09:00
Bo26fhmC5M
c57c256190 fix: reactive declarations 2025-01-16 01:23:02 +09:00
Bo26fhmC5M
d59cc1a29c refactor: update UI management to index-based approach 2025-01-15 19:56:07 +09:00
Bo26fhmC5M
3e234dcb15 feat: add dual-action translation (cached/regenerate) in HypaV3 modal
Implements shift+click (desktop) and double tap (mobile) for regenerating translations while maintaining regular click/tap for cached translations.
2025-01-15 13:45:34 +09:00
Bo26fhmC5M
f397b6ef1a feat: add translate button to HypaV3 modal 2025-01-15 02:05:23 +09:00
Bo26fhmC5M
a10a2c5502 refactor: extract HypaV3 modal into separate component 2025-01-14 13:01:14 +09:00
Bo26fhmC5M
030e802122 fix: message line break display in HypaV3 Data modal 2025-01-14 01:10:06 +09:00
Bo26fhmC5M
f3c6278d21 feat: add important button in HypaV3 Data modal 2025-01-13 23:30:18 +09:00
Bo26fhmC5M
a7c3141cc0 feat: add expandable chat memo in HypaV3 Data modal 2025-01-13 22:33:27 +09:00
Bo26fhmC5M
4176a647a5 fix: restore undefined value from null after importing hypaDataV3 2025-01-13 19:31:24 +09:00
Bo26fhmC5M
a1158ebdb1 fix: adjust memory selection order 2025-01-13 14:09:18 +09:00
kwaroran
3fa199dbfa Improve prompt comparison functionality with usability enhancements (#716)
# PR Checklist
- [ ] Have you checked if it works normally in all models? *Ignore this
if it doesn't use models.*
- [x] Have you checked if it works normally in all web, local, and node
hosted versions? If it doesn't, have you blocked it in those versions?
- [x] Have you added type definitions?

# Description
This PR introduces a couple of usability improvements to the prompt
comparison functionality.

1. If the two prompts are identical

Instead of showing the content right away, an alert is displayed saying
the two prompts are the same. Only when the user clicks "Yes" the
content will be shown. This avoids unnecessary confirmation of identical
prompts.

<img width="519" alt="a"
src="https://github.com/user-attachments/assets/bf48420e-bf69-4c8a-b700-754e1c38b6a6"
/>


2. If the two prompts are different

A summary of the number of modified, added, and removed lines is
displayed.

<img width="598" alt="b"
src="https://github.com/user-attachments/assets/c3269ee8-25e7-4ba9-957d-4e377d523795"
/>

When hovering over the summary, a quick overview of the changes appears.
When only a single word or character is modified, it was previously hard
to identify the line that was changed. Now, the overview improves
clarity, making it easier to understand the changes.

<img width="595" alt="e"
src="https://github.com/user-attachments/assets/1b55a3bc-70d2-43fa-ab4c-754e6fd4a85d"
/>

On mobile devices (tested on iOS 16.7), tapping on the 'Differences
detected. Please review the changes.' section will display the changes.

---

As a future improvement, it might be useful to display line numbers or
allow users to click and navigate to the specific parts of the
differences.

I hope these changes make it easier to use, but feel free to reject this
PR if you find it unnecessary or if the code feels too messy. I
completely understand and appreciate your feedback.

Thank you for your time!
2025-01-12 23:59:13 +09:00
Bo26fhmC5M
ab7a2aa499 feat: add resummarize button to HypaV3 Data modal 2025-01-12 23:32:20 +09:00
Bo26fhmC5M
be1713df4b feat: add trash button to HypaV3 Data modal 2025-01-12 19:12:04 +09:00
Bo26fhmC5M
50361d7aa2 feat: Implement HypaV3 ratio-based memory 2025-01-12 11:05:18 +09:00
poroyo
2ee72ca86f feat: add tooltip for differences overview 2025-01-11 18:30:45 +09:00
poroyo
d9f4951c1c feat: add prompt comparison alert for identical prompts 2025-01-11 14:33:06 +09:00
Kwaroran
9fc8978d1d Add GeminiBlockOff 2025-01-07 00:05:20 +09:00
Kwaroran
2ec13a4550 Modify some parts of PR 2025-01-06 00:30:33 +09:00
Kwaroran
c0e1311568 Add branches 2025-01-06 00:24:03 +09:00
kwaroran
7d1e9dc9bd feat: add prompt comparison feature (#704)
# PR Checklist
- [ ] Have you checked if it works normally in all models? *Ignore this
if it doesn't use models.*
- [x] Have you checked if it works normally in all web, local, and node
hosted versions? If it doesn't, have you blocked it in those versions?
- [x] Have you added type definitions?

# Description
This PR adds a **prompt comparison feature** to the prompt preset
interface. Now, users can compare two different prompts to identify
differences.

## How to Use
1. Open the prompt preset window.
2. Click the diff button (next to the copy button) for the first prompt
to use as the baseline. The button will turn green, indicating
selection.
<img width="487" alt="c"
src="https://github.com/user-attachments/assets/c2dcf5fa-c4ee-4b3f-8e52-3f0866b12bc4"
/>

3. Click the diff button for the second prompt to compare against the
baseline. A diff view will appear.
4. Clicking the same diff button twice will clear the selection.

## Diff Display Details
- Line-level comparison
- Modified lines: blue vertical line.
- Deleted content: red text on red background with red vertical line.
- Added content: green text on light green background with green
vertical line.

<img width="597" alt="b"
src="https://github.com/user-attachments/assets/0d026e9e-a7a0-4a17-9b80-a2b57c74d7f9"
/>


- If the prompt content is identical, the following message will be
displayed at the top

<img width="600" alt="a"
src="https://github.com/user-attachments/assets/dd5f36f2-9e96-4279-9f9f-79a17f9e4c89"
/>


## Implementation Details
1. `handleDiffMode` manages prompt selection and clearing.
2. `checkDiff` compares prompts and uses `highlightChanges` to mark
differences.
3. Special characters are escaped with `escapeHtml` to ensure the text
is displayed as-is.
4. `resultHtml` is rendered via `alertMd`.

## Notes
- This feature uses the `jsdiff` library to compare prompts efficiently.
- The comparison includes the role, type1, and type2 fields (e.g., ##
system; plain; main). Even if the prompts' text is identical,
differences in these fields will be treated as a mismatch.
- The rendering process in `alertMd` appears to sanitize potentially
dangerous content. However, additional escaping is applied to ensure
that the text is displayed as-is.
- `botpreset.svelte` grew significantly due to this feature;
modularization was considered but not implemented.
- The reason for using the "Prompt Preset" window instead of the "Prompt
Preview" feature is that "Prompt Preview" displays the final form with
CBS processing applied. Even if the content in "Prompt Preview" appears
identical, the actual prompts can differ significantly.

If this feature, its implementation, or any other issue doesn't fit the
project's vision, feel free to reject this PR! Thank you for reviewing!
2025-01-06 00:10:51 +09:00