Commit Graph

3450 Commits

Author SHA1 Message Date
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
d18b79a17e feat: install pnpm globally in server scripts 2025-01-17 23:07:54 +09:00
Kwaroran
46eed96c86 feat: update application version to 147.0.0 2025-01-17 22:58:30 +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
kwaroran
847a1553bb feat: add navigation to modified lines in prompt comparison (#723)
# 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 small improvement to the prompt comparison functionality.

When the two prompts are different, the tooltip overview now enables
clicking on modified parts to navigate directly to the corresponding
lines.

Previously, finding the modified parts required manual scrolling. With
this update, it becomes much easier to locate and review the changes,
even for very long prompts.

When navigating to a modified part, the target line is highlighted in
yellow for 1 second to indicate the clicked location.



https://github.com/user-attachments/assets/577973cc-18d0-4e73-814e-7ba01bb9950c


For mobile devices, this functionality has been tested on iOS 16.7.

If there are any suggestions for improvement or concerns about the
implementation, feedback is greatly appreciated. It’s completely
understandable if this PR needs to be rejected or revised further.

Thank you for taking the time to review this!
2025-01-17 22:53:57 +09:00
kwaroran
1d98a63d4c feat: apply positionParser to alternate global note (#724)
# PR Checklist
- [ ] Have you checked if it works normally in all models? *Ignore this
if it doesn't use models.*
- [ ] 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?
- [ ] Have you added type definitions?

# Description
This PR ensures that the 'position' lorebook decorator is correctly
applied to alternate (replaced) GlobalNotes.
Thank you for your time and consideration.
2025-01-17 22:53:45 +09:00
kwaroran
8a4932e19c suggestion: apply 'processScriptFull()' to 'editprocess' mode regex script (#725)
# PR Checklist
- [ ] Have you checked if it works normally in all models? *Ignore this
if it doesn't use models.*
- [ ] 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?
- [ ] Have you added type definitions?

# Description
This PR addresses an issue where the `{{chat_index}}` cbs does not work
correctly in regex scripts of the 'Modify Request Data' (editprocess)
type. To work around this issue, I propose changing the function used in
this section to `processScriptFull()`.

If you have any other suggestions, such as modifying the arguments
instead, please feel free to let me know.

Thanks for your time and consideration.
2025-01-17 22:52:49 +09:00
Bo26fhmC5M
b43eec49d1 fix: handle empty message edge cases in getNextMessageToSummarize 2025-01-17 09:03:23 +09:00
bangonicdd
172efe4d68 suggestion: apply 'processScriptFull()' to 'editprocess' mode regex script 2025-01-17 03:58:20 +09:00
Bo26fhmC5M
171b267891 feat: display next message to be summarized in HypaV3 modal 2025-01-17 02:22:46 +09:00
bangonicdd
23fd706d9b feat: apply positionParser to alternate global note 2025-01-17 00:23:14 +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
fac11bfe67 fix: improve HypaV3 logging 2025-01-16 22:40:08 +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
kwaroran
521a374215 feat: improve HypaV3 (#720)
# 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?
- [ ] Have you added type definitions?

# Preview

![preview](https://github.com/user-attachments/assets/9cbd7cd0-fc9d-40d4-bcc7-69c5bfb000a2)

# Description
- refactor: improve array conversion and sorting syntax
- fix: resolve summarize function issues with instruct35
- fix: adjust memory selection order
- fix: restore undefined value from null after importing hypaDataV3
- feat: add expandable chat memo in HypaV3 Data modal
- feat: add important button in HypaV3 Data modal
- fix: message line break display in HypaV3 Data modal
- refactor: extract HypaV3 modal into separate component
2025-01-15 00:00:03 +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
Bo26fhmC5M
cfdd5d6bf5 fix: resolve summarize function issues with instruct35 2025-01-13 13:30:10 +09:00
Bo26fhmC5M
04e640a791 refactor: improve array conversion and sorting syntax 2025-01-13 13:02:22 +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
kwaroran
876130fc68 feat: Implement HypaV3 ratio-based memory (Variation of HypaV2) (#717)
# 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?

# Preview

![preview](https://github.com/user-attachments/assets/6555534b-d798-49bf-a0d5-79148c3445b3)

# Description
Implemented HypaV3, a variation of the HypaV2 memory.

---
Key Changes:
- Ratio-based token management instead of fixed token counts
(memoryTokensRatio, extraSummarizationRatio)
- Improved memory selection with adjustable ratios
(recent/similar/random memory)
- Similar memory selection now uses parent summaries instead of
individual chunks
- Selected memories are chronologically ordered
- Control over summary units (maxChatsPerSummary)
- Added orphaned memory preservation option (preserveOrphanedMemory)

---
New Settings:
- memoryTokensRatio: Ratio of memory prompt in max context size
- extraSummarizationRatio: Extra margin ratio of max context size to
keep more free space when summarizing begins
- maxChatsPerSummary: Maximum chats per summary
- similarMemoryRatio: Ratio for similarity-based memory selection
- randomMemoryRatio: Ratio for random memory selection
- enableSimilarityCorrection: Compare chunks with both raw and
summarized version of last 3 chats for better similarity matching
- preserveOrphanedMemory: Keep summaries even when original chats are
deleted

---
Summarization Conditions:
- Start: When current tokens exceed max context size
- End: When either:
- Current tokens drop below maxContextTokens * (1 - memoryTokensRatio -
extraSummarizationRatio)
- Current tokens are within max context size and only minimum required
messages (3) remain

---
Memory Selection Process:
- Recent: Newest summaries up to recentMemoryRatio (1 -
similarMemoryRatio - randomMemoryRatio)
- Random: Unused summaries selected randomly up to randomMemoryRatio
- Similar: Unused summaries selected by similarity to last 3 messages
- Each summary is split into chunks and compared with raw recent
messages for similarity scoring
- When similarity correction enabled, also compares with summarized
version of recent messages
  - Parent summaries of the most similar chunks are selected
- Unused token space from recent and random selections is added to
similar memory's token limit

---
Key Differences from HypaV2:
- Flexible ratio-based memory management instead of absolute values
- Selects parent summaries instead of individual chunks for similar
memory
- UI shows original chat's memos linked to each summary
2025-01-12 23:59:03 +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
f08c31612b fix: prevent over-summarization and improve logging 2025-01-12 17:15:11 +09:00
Bo26fhmC5M
6e49970b76 fix: correct targetTokens calculation in summarization and improve logging 2025-01-12 14:49:01 +09:00
Bo26fhmC5M
85bdf1d544 fix: improve memory token tracking and logging 2025-01-12 13:17:56 +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
3b533e911f fix backup in non-tauri environment (#713)
# PR Checklist
- [ ] Have you checked if it works normally in all models? *Ignore this
if it doesn't use models.*
- [ ] 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?
- [ ] Have you added type definitions?

# Description
EN
fix non-tauri environment backup issue. (e.g. backwards reset issue)
fix applying duplicate backup file.

KR
Tauri 환경(로컬리스)가 아닌 상황에서 과거 20개의 백업본 이외에 나머지 백업본을 저장하지 않던 문제를 수정합니다.
(뒤로가기 이슈)
백업본 적용 시 모든 백업본을 적용해보던 로직을 개선합니다.
2025-01-11 01:44:58 +09:00
kwaroran
c363d50aa3 fix: gemini multimodal (#712)
# PR Checklist
- [ ] Have you checked if it works normally in all models? *Ignore this
if it doesn't use models.*
- [ ] 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?
- [ ] Have you added type definitions?

# Description
fix gemini multimodal error.
ERROR MESSAGE : Invalid value at 'contents[6].parts[1]' (oneof), oneof
field 'data' is already set. Cannot set 'text'
2025-01-11 01:44:30 +09:00
kwaroran
edb4964da7 fix: Fix message handling and summarization in HypaV2 (#711)
# 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?
- [ ] Have you added type definitions?

# Description
This PR addresses several issues in the HypaV2 memory system:

1. Improved Summarization Error Handling
- Before: When unable to summarize messages while exceeding context
size, HypaV2 would continue and make API requests with unintentionally
truncated context
- After: HypaV2 now provides clear error messages asking users to adjust
their settings when:
  - Unable to summarize last 4 messages
  - A single message exceeds chunk size

2. Message Order Preservation
- Before: lastTwoChats logic was causing the first message (index 1) and
user input (index 2) to appear in the wrong order
- After: Fixed by adjusting the initial index to preserve the original
message sequence

3. Message Filtering
- Added logic to skip unnecessary messages during summarization:
  - Excludes [Start a new chat] message at index 0
  - Skips empty messages
<br>
Requesting review from @LightningHyperBlaze45654
2025-01-11 01:44:10 +09:00
kwaroran
9896b68b7a fix: resolve state_unsafe_mutation in getChatVar() (#707)
# PR Checklist
- [ ] Have you checked if it works normally in all models? *Ignore this
if it doesn't use models.*
- [ ] 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?
- [ ] Have you added type definitions?

# Description
While investigating an issue where `{{getvar::A}}` didn't work properly
in background embedding, I encountered a `state_unsafe_mutation` error.
It appears that modifying the null check operator on the relevant line
can resolve this issue. Thank for your time.
2025-01-11 01:44:01 +09:00
Bo26fhmC5M
7c1faee6f4 fix: Fix message handling and summarization in HypaV2
- Add clear error messages when summarization is not possible
- Fix message order issues caused by lastTwoChats logic
- Skip [Start a new chat] and empty messages during summarization
2025-01-08 20:45:19 +09:00
jinook518
07817c9d8b fix backup 2025-01-08 00:37:31 +09:00
donmarble
2d11b05e6c fix: gemini multimodal text 2025-01-07 23:45:01 +09:00
Kwaroran
64b9b89220 fix: remove geminiBlockOff flag from LLM models 2025-01-07 00:14:58 +09:00
Kwaroran
708faeaea8 chore: update application version to 146.1.0 2025-01-07 00:07:24 +09:00