Compare commits

...

41 Commits

Author SHA1 Message Date
github-actions[bot]
9b830f9801 Update version to v1.4.164 and commit 2025-03-22 08:52:21 +00:00
Eugen Eisler
dda73d3333 Merge pull request #1380 from jmd1010/web-windows-resizing
Add flex windows sizing to web interface + raw text input fix
2025-03-22 09:51:07 +01:00
Eugen Eisler
40c26d9c9e Merge pull request #1379 from guilhermechapiewski/patch-1
Fix typo on fallacies instruction.
2025-03-22 09:50:14 +01:00
Eugen Eisler
cdd86b0ed9 Merge pull request #1382 from ksylvan/03-21-README-fixes
docs: improve README formatting and fix some broken links
2025-03-22 09:49:32 +01:00
Kayvan Sylvan
c2e84d6db9 docs: improve README formatting and add clipboard support section
## CHANGES

- Remove colons from heading anchors
- Fix broken installation link reference
- Replace code tags with backticks
- Improve code block formatting with indentation
- Clarify package manager alias requirements
- Fix environment variables link
- Simplify custom patterns directory instructions
2025-03-21 23:34:27 -07:00
jmd1010
4208a02191 fixed processing message not stopping after pattern output completion 2025-03-21 23:26:54 -04:00
jmd1010
943b26eeef Add flex windows sizing to web interface 2025-03-21 18:22:54 -04:00
Guilherme Chapiewski
d6ceae9efd Fix typo on fallacies instruction. 2025-03-21 11:30:52 -07:00
Eugen Eisler
f57dc6d681 Merge pull request #1376 from vaygr/install-update
Add installation instructions for OS package managers
2025-03-21 13:57:00 +01:00
Val V
4e4bfc9d5d Add installation instructions for OS package managers 2025-03-21 03:12:43 +00:00
Daniel Miessler
ea137c1525 Updated find prompt. 2025-03-20 14:36:00 -07:00
Daniel Miessler
f0be1d4735 Updated find prompt. 2025-03-20 14:28:15 -07:00
Daniel Miessler
e3975b9364 Updated find prompt. 2025-03-20 14:25:24 -07:00
Daniel Miessler
cd48802ea0 Updated find prompt. 2025-03-20 14:23:10 -07:00
Daniel Miessler
dceccd8e72 Merge branch 'main' of github.com:danielmiessler/fabric 2025-03-20 14:16:17 -07:00
Daniel Miessler
0813ad9c39 Added find_female_life_partner. 2025-03-20 14:16:06 -07:00
github-actions[bot]
e391132167 Update version to v1.4.163 and commit 2025-03-19 03:50:11 +00:00
Eugen Eisler
c7f86d3a0c Merge pull request #1362 from danielmiessler/dependabot/go_modules/go_modules-c153b83258
Bump golang.org/x/net from 0.35.0 to 0.36.0 in the go_modules group across 1 directory
2025-03-19 04:48:57 +01:00
Eugen Eisler
f0d92f9424 Merge pull request #1372 from rube-de/patch-1
fix: set percentEncoded to false
2025-03-19 04:48:26 +01:00
Eugen Eisler
4a9bdb1479 Merge pull request #1373 from ksylvan/main
Remove unnecessary `system.md` file at top level.
2025-03-19 04:47:02 +01:00
github-actions[bot]
7eed80710e Update version to v1.4.162 and commit 2025-03-19 03:45:25 +00:00
Eugen Eisler
fbd62be47d Merge pull request #1374 from ksylvan/fix/change-default-model-save
Fix Default Model Change Functionality
2025-03-19 04:44:11 +01:00
Kayvan Sylvan
85cc7b8a9d fix: improve error handling in ChangeDefaultModel flow and save environment file
- Add early return on setup error
- Save environment file after successful setup
- Maintain proper error propagation
2025-03-17 19:37:26 -07:00
Kayvan Sylvan
1fe8afd329 chore: Remove redundant file system.md at top level.
CHANGES:
- Removed `system.md` on the top level of the fabric repo.
- system.md was an RPG session summarization prompt.
- There are two other RPM summary patterns created after this file was added: `create_rpg_summary` and `summarize_rpg_session`
2025-03-17 15:09:36 -07:00
beruf
e89ccf5e97 fix: set percentEncoded to false
If you use a youtube link like `https://youtu.be/sHIlFKKaq0A` percentEndcoding encodes the link to `https%3A%2F%2Fyoutu.be%2FsHIlFKKaq0A`, which throws an error in fabric.

With percentEndcoding false, the script receives the link without encoding and works.
2025-03-17 22:43:02 +01:00
github-actions[bot]
0eee89140c Update version to v1.4.161 and commit 2025-03-17 14:21:02 +00:00
Eugen Eisler
5571e6fafd Merge pull request #1363 from garkpit/streamlit-clipboard-ops-for-all-platforms
clipboard operations now work on Mac and PC
2025-03-17 15:19:42 +01:00
github-actions[bot]
9a4e920618 Update version to v1.4.160 and commit 2025-03-17 14:17:36 +00:00
Eugen Eisler
6e479999b1 Merge pull request #1368 from vaygr/std-no-repeat
Standardize sections for no repeat guidelines
2025-03-17 15:16:21 +01:00
Daniel Miessler
f65f2501b4 Moved system file to proper directory. 2025-03-16 14:46:13 -07:00
Daniel Miessler
4b12bd2a61 Moved system file to proper directory. 2025-03-16 14:43:55 -07:00
Daniel Miessler
d83a3beeeb Merge branch 'main' of github.com:danielmiessler/fabric 2025-03-16 14:16:02 -07:00
Daniel Miessler
7428c8017f Added activity extractor. 2025-03-16 14:15:54 -07:00
Val V
008ed76d37 Standardize sections for no repeat guidelines 2025-03-16 19:48:15 +00:00
github-actions[bot]
ce9d4ad831 Update version to v1.4.159 and commit 2025-03-16 19:23:15 +00:00
Daniel Miessler
657bcab48c Added flashcard generator. 2025-03-16 12:21:50 -07:00
github-actions[bot]
cd11dcc7a9 Update version to v1.4.158 and commit 2025-03-16 17:26:52 +00:00
Eugen Eisler
22040a42f2 Merge pull request #1367 from ksylvan/fix/code_cleanup
Remove Generic Type Parameters from StorageHandler Initialization
2025-03-16 18:25:33 +01:00
Kayvan Sylvan
705ccd750b refactor: remove generic type parameters from NewStorageHandler calls
## CHANGES

- Remove explicit type parameters from StorageHandler initialization
- Update contexts handler constructor implementation
- Update patterns handler constructor implementation
- Update sessions handler constructor implementation
- Simplify API by relying on type inference
2025-03-16 09:21:17 -07:00
Jay
b5c2d069f2 clipboard operations now work on Mac and PC 2025-03-15 08:31:48 +00:00
dependabot[bot]
a227e61952 Bump golang.org/x/net in the go_modules group across 1 directory
Bumps the go_modules group with 1 update in the / directory: [golang.org/x/net](https://github.com/golang/net).


Updates `golang.org/x/net` from 0.35.0 to 0.36.0
- [Commits](https://github.com/golang/net/compare/v0.35.0...v0.36.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: indirect
  dependency-group: go_modules
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-13 02:06:32 +00:00
51 changed files with 1058 additions and 605 deletions

View File

@@ -122,7 +122,7 @@
},
{
"patternName": "analyze_threat_report_trends",
"pattern_extract": "# IDENTITY and PURPOSE\n\nYou are a super-intelligent cybersecurity expert. You specialize in extracting the surprising, insightful, and interesting information from cybersecurity threat reports.\n\nTake a step back and think step-by-step about how to achieve the best possible results by following the steps below.\n\n# STEPS\n\n- Read the entire threat report from an expert perspective, thinking deeply about what's new, interesting, and surprising in the report.\n\n- Extract up to 50 of the most surprising, insightful, and/or interesting trends from the input in a section called TRENDS:. If there are less than 50 then collect all of them. Make sure you extract at least 20.\n\n# OUTPUT INSTRUCTIONS\n\n- Only output Markdown.\n- Do not output the markdown code syntax, only the content.\n- Do not use bold or italics formatting in the markdown output.\n- Extract at least 20 TRENDS from the content.\n- Do not give warnings or notes; only output the requested sections.\n- You use bulleted lists for output, not numbered lists.\n- Do not repeat ideas, quotes, facts, or resources.\n- Do not start items with the same opening words.\n- Ensure you follow ALL these instructions when creating your output.\n\n# INPUT"
"pattern_extract": "# IDENTITY and PURPOSE\n\nYou are a super-intelligent cybersecurity expert. You specialize in extracting the surprising, insightful, and interesting information from cybersecurity threat reports.\n\nTake a step back and think step-by-step about how to achieve the best possible results by following the steps below.\n\n# STEPS\n\n- Read the entire threat report from an expert perspective, thinking deeply about what's new, interesting, and surprising in the report.\n\n- Extract up to 50 of the most surprising, insightful, and/or interesting trends from the input in a section called TRENDS:. If there are less than 50 then collect all of them. Make sure you extract at least 20.\n\n# OUTPUT INSTRUCTIONS\n\n- Only output Markdown.\n- Do not output the markdown code syntax, only the content.\n- Do not use bold or italics formatting in the markdown output.\n- Extract at least 20 TRENDS from the content.\n- Do not give warnings or notes; only output the requested sections.\n- You use bulleted lists for output, not numbered lists.\n- Do not repeat trends.\n- Do not start items with the same opening words.\n- Ensure you follow ALL these instructions when creating your output.\n\n# INPUT"
},
{
"patternName": "answer_interview_question",
@@ -402,7 +402,7 @@
},
{
"patternName": "extract_business_ideas",
"pattern_extract": "# IDENTITY and PURPOSE\n\nYou are a business idea extraction assistant. You are extremely interested in business ideas that could revolutionize or just overhaul existing or new industries.\n\nTake a deep breath and think step by step about how to achieve the best result possible as defined in the steps below. You have a lot of freedom to make this work well.\n\n## OUTPUT SECTIONS\n\n1. You extract all the top business ideas from the content. It might be a few or it might be up to 40 in a section called EXTRACTED_IDEAS\n\n2. Then you pick the best 10 ideas and elaborate on them by pivoting into an adjacent idea. This will be ELABORATED_IDEAS. They should each be unique and have an interesting differentiator.\n\n## OUTPUT INSTRUCTIONS\n\n1. You only output Markdown.\n2. Do not give warnings or notes; only output the requested sections.\n3. You use numbered lists, not bullets.\n4. Do not repeat ideas, quotes, facts, or resources.\n5. Do not start items in the lists with the same opening words.\n\n# INPUT:\n\nINPUT:"
"pattern_extract": "# IDENTITY and PURPOSE\n\nYou are a business idea extraction assistant. You are extremely interested in business ideas that could revolutionize or just overhaul existing or new industries.\n\nTake a deep breath and think step by step about how to achieve the best result possible as defined in the steps below. You have a lot of freedom to make this work well.\n\n## OUTPUT SECTIONS\n\n1. You extract all the top business ideas from the content. It might be a few or it might be up to 40 in a section called EXTRACTED_IDEAS\n\n2. Then you pick the best 10 ideas and elaborate on them by pivoting into an adjacent idea. This will be ELABORATED_IDEAS. They should each be unique and have an interesting differentiator.\n\n## OUTPUT INSTRUCTIONS\n\n1. You only output Markdown.\n2. Do not give warnings or notes; only output the requested sections.\n3. You use numbered lists, not bullets.\n4. Do not repeat ideas.\n5. Do not start items in the lists with the same opening words.\n\n# INPUT:\n\nINPUT:"
},
{
"patternName": "extract_controversial_ideas",
@@ -438,7 +438,7 @@
},
{
"patternName": "extract_jokes",
"pattern_extract": "# IDENTITY and PURPOSE\n\nYou extract jokes from text content. You are interested only in jokes.\n\nYou create bullet points that capture the joke and punchline.\n\n# OUTPUT INSTRUCTIONS\n\n- Only output Markdown.\n\n- Only extract jokes.\n\n- Each bullet should should have the joke followed by punchline on the next line.\n\n- Do not give warnings or notes; only output the requested sections.\n\n- You use bulleted lists for output, not numbered lists.\n\n- Do not repeat jokes, quotes, facts, or resources.\n\n- Ensure you follow ALL these instructions when creating your output.\n\n\n# INPUT\n"
"pattern_extract": "# IDENTITY and PURPOSE\n\nYou extract jokes from text content. You are interested only in jokes.\n\nYou create bullet points that capture the joke and punchline.\n\n# OUTPUT INSTRUCTIONS\n\n- Only output Markdown.\n\n- Only extract jokes.\n\n- Each bullet should should have the joke followed by punchline on the next line.\n\n- Do not give warnings or notes; only output the requested sections.\n\n- You use bulleted lists for output, not numbered lists.\n\n- Do not repeat jokes.\n\n- Ensure you follow ALL these instructions when creating your output.\n\n\n# INPUT\n"
},
{
"patternName": "extract_latest_video",
@@ -446,7 +446,7 @@
},
{
"patternName": "extract_main_idea",
"pattern_extract": "# IDENTITY and PURPOSE\n\nYou extract the primary and/or most surprising, insightful, and interesting idea from any input.\n\nTake a step back and think step-by-step about how to achieve the best possible results by following the steps below.\n\n# STEPS\n\n- Fully digest the content provided.\n\n- Extract the most important idea from the content.\n\n- In a section called MAIN IDEA, write a 15-word sentence that captures the main idea.\n\n- In a section called MAIN RECOMMENDATION, write a 15-word sentence that captures what's recommended for people to do based on the idea.\n\n# OUTPUT INSTRUCTIONS\n\n- Only output Markdown.\n- Do not give warnings or notes; only output the requested sections.\n- Do not repeat ideas, quotes, facts, or resources.\n- Do not start items with the same opening words.\n- Ensure you follow ALL these instructions when creating your output.\n\n# INPUT"
"pattern_extract": "# IDENTITY and PURPOSE\n\nYou extract the primary and/or most surprising, insightful, and interesting idea from any input.\n\nTake a step back and think step-by-step about how to achieve the best possible results by following the steps below.\n\n# STEPS\n\n- Fully digest the content provided.\n\n- Extract the most important idea from the content.\n\n- In a section called MAIN IDEA, write a 15-word sentence that captures the main idea.\n\n- In a section called MAIN RECOMMENDATION, write a 15-word sentence that captures what's recommended for people to do based on the idea.\n\n# OUTPUT INSTRUCTIONS\n\n- Only output Markdown.\n- Do not give warnings or notes; only output the requested sections.\n- Do not start items with the same opening words.\n- Ensure you follow ALL these instructions when creating your output.\n\n# INPUT"
},
{
"patternName": "extract_most_redeeming_thing",
@@ -474,7 +474,7 @@
},
{
"patternName": "extract_product_features",
"pattern_extract": "# IDENTITY and PURPOSE\n\nYou extract the list of product features from the input.\n\nTake a step back and think step-by-step about how to achieve the best possible results by following the steps below.\n\n# STEPS\n\n- Consume the whole input as a whole and think about the type of announcement or content it is.\n\n- Figure out which parts were talking about features of a product or service.\n\n- Output the list of features as a bulleted list of 16 words per bullet.\n\n# OUTPUT INSTRUCTIONS\n\n- Only output Markdown.\n\n- Do not give warnings or notes; only output the requested sections.\n\n- You use bulleted lists for output, not numbered lists.\n\n- Do not repeat ideas, quotes, facts, or resources.\n\n- Do not start items with the same opening words."
"pattern_extract": "# IDENTITY and PURPOSE\n\nYou extract the list of product features from the input.\n\nTake a step back and think step-by-step about how to achieve the best possible results by following the steps below.\n\n# STEPS\n\n- Consume the whole input as a whole and think about the type of announcement or content it is.\n\n- Figure out which parts were talking about features of a product or service.\n\n- Output the list of features as a bulleted list of 16 words per bullet.\n\n# OUTPUT INSTRUCTIONS\n\n- Only output Markdown.\n\n- Do not give warnings or notes; only output the requested sections.\n\n- You use bulleted lists for output, not numbered lists.\n\n- Do not repeat features.\n\n- Do not start items with the same opening words."
},
{
"patternName": "extract_questions",

108
README.md
View File

@@ -41,11 +41,14 @@
- [Too many prompts](#too-many-prompts)
- [Installation](#installation)
- [Get Latest Release Binaries](#get-latest-release-binaries)
- [Windows:](#windows)
- [MacOS (arm64):](#macos-arm64)
- [MacOS (amd64):](#macos-amd64)
- [Linux (amd64):](#linux-amd64)
- [Linux (arm64):](#linux-arm64)
- [Windows](#windows)
- [macOS (arm64)](#macos-arm64)
- [macOS (amd64)](#macos-amd64)
- [Linux (amd64)](#linux-amd64)
- [Linux (arm64)](#linux-arm64)
- [Using package managers](#using-package-managers)
- [macOS (Homebrew)](#macos-homebrew)
- [Arch Linux (AUR)](#arch-linux-aur)
- [From Source](#from-source)
- [Environment Variables](#environment-variables)
- [Setup](#setup)
@@ -66,6 +69,7 @@
- [Web Interface](#web-interface)
- [Installing](#installing)
- [Streamlit UI](#streamlit-ui)
- [Clipboard Support](#clipboard-support)
- [Meta](#meta)
- [Primary contributors](#primary-contributors)
@@ -90,7 +94,7 @@ Fabric was created to address this by enabling everyone to granularly apply AI t
## Intro videos
Keep in mind that many of these were recorded when Fabric was Python-based, so remember to use the current [install instructions](#Installation) below.
Keep in mind that many of these were recorded when Fabric was Python-based, so remember to use the current [install instructions](#installation) below.
- [Network Chuck](https://www.youtube.com/watch?v=UbDyjIIGaxQ)
- [David Bombal](https://www.youtube.com/watch?v=vF-MQmVxnCs)
@@ -113,7 +117,7 @@ Our approach is to break problems into individual pieces (see below) and then ap
Prompts are good for this, but the biggest challenge I faced in 2023——which still exists today—is **the sheer number of AI prompts out there**. We all have prompts that are useful, but it's hard to discover new ones, know if they are good or not, _and manage different versions of the ones we like_.
One of <code>fabric</code>'s primary features is helping people collect and integrate prompts, which we call _Patterns_, into various parts of their lives.
One of `fabric`'s primary features is helping people collect and integrate prompts, which we call _Patterns_, into various parts of their lives.
Fabric has Patterns for all sorts of life and work activities, including:
@@ -134,21 +138,43 @@ To install Fabric, you can use the latest release binaries or install it from th
### Get Latest Release Binaries
#### Windows:
#### Windows
`https://github.com/danielmiessler/fabric/releases/latest/download/fabric-windows-amd64.exe`
#### MacOS (arm64):
#### macOS (arm64)
`curl -L https://github.com/danielmiessler/fabric/releases/latest/download/fabric-darwin-arm64 > fabric && chmod +x fabric && ./fabric --version`
#### MacOS (amd64):
#### macOS (amd64)
`curl -L https://github.com/danielmiessler/fabric/releases/latest/download/fabric-darwin-amd64 > fabric && chmod +x fabric && ./fabric --version`
#### Linux (amd64):
#### Linux (amd64)
`curl -L https://github.com/danielmiessler/fabric/releases/latest/download/fabric-linux-amd64 > fabric && chmod +x fabric && ./fabric --version`
#### Linux (arm64):
#### Linux (arm64)
`curl -L https://github.com/danielmiessler/fabric/releases/latest/download/fabric-linux-arm64 > fabric && chmod +x fabric && ./fabric --version`
### Using package managers
**NOTE:** using Homebrew or the Arch Linux package managers makes `fabric` available as `fabric-ai`, so add
the following alias to your shell startup files to account for this:
```bash
alias fabric='fabric-ai'
```
#### macOS (Homebrew)
`brew install fabric-ai`
#### Arch Linux (AUR)
`yay -S fabric-ai`
### From Source
To install Fabric, [make sure Go is installed](https://go.dev/doc/install), and then run the following command.
@@ -317,7 +343,7 @@ This also creates a `yt` alias that allows you to use `yt https://www.youtube.co
#### Save your files in markdown using aliases
If in addition to the above aliases you would like to have the option to save the output to your favourite markdown note vault like Obsidian then instead of the above add the following to your `.zshrc` or `.bashrc` file:
If in addition to the above aliases you would like to have the option to save the output to your favorite markdown note vault like Obsidian then instead of the above add the following to your `.zshrc` or `.bashrc` file:
```bash
# Define the base directory for Obsidian notes
@@ -328,7 +354,7 @@ for pattern_file in ~/.config/fabric/patterns/*; do
# Get the base name of the file (i.e., remove the directory path)
pattern_name=$(basename "$pattern_file")
# Unalias any existing alias with the same name
# Remove any existing alias with the same name
unalias "$pattern_name" 2>/dev/null
# Define a function dynamically for each pattern
@@ -370,7 +396,7 @@ go install github.com/danielmiessler/fabric@latest
fabric --setup
```
Then [set your environmental variables](#environmental-variables) as shown above.
Then [set your environmental variables](#environment-variables) as shown above.
### Upgrading
@@ -477,31 +503,29 @@ Now let's look at some things you can do with Fabric.
1. Run the `summarize` Pattern based on input from `stdin`. In this case, the body of an article.
```bash
pbpaste | fabric --pattern summarize
```
```bash
pbpaste | fabric --pattern summarize
```
2. Run the `analyze_claims` Pattern with the `--stream` option to get immediate and streaming results.
```bash
pbpaste | fabric --stream --pattern analyze_claims
```
```bash
pbpaste | fabric --stream --pattern analyze_claims
```
3. Run the `extract_wisdom` Pattern with the `--stream` option to get immediate and streaming results from any Youtube video (much like in the original introduction video).
```bash
fabric -y "https://youtube.com/watch?v=uXs-zPc63kM" --stream --pattern extract_wisdom
```
3. Run the `extract_wisdom` Pattern with the `--stream` option to get immediate and streaming results from any Youtube video (much like in the original introduction video).
```bash
fabric -y "https://youtube.com/watch?v=uXs-zPc63kM" --stream --pattern extract_wisdom
```
4. Create patterns- you must create a .md file with the pattern and save it to `~/.config/fabric/patterns/[yourpatternname]`.
5. Run a `analyze_claims` pattern on a website. Fabric uses Jina AI to scrape the URL into markdown format before sending it to the model.
```bash
fabric -u https://github.com/danielmiessler/fabric/ -p analyze_claims
```
```bash
fabric -u https://github.com/danielmiessler/fabric/ -p analyze_claims
```
## Just use the Patterns
@@ -539,15 +563,10 @@ You may want to use Fabric to create your own custom Patterns—but not share th
Just make a directory in `~/.config/custompatterns/` (or wherever) and put your `.md` files in there.
When you're ready to use them, copy them into:
```
~/.config/fabric/patterns/
```
When you're ready to use them, copy them into `~/.config/fabric/patterns/`
You can then use them like any other Patterns, but they won't be public unless you explicitly submit them as Pull Requests to the Fabric project. So don't worry—they're private to you.
## Helper Apps
Fabric also makes use of some core helper apps (tools) to make it easier to integrate with your various workflows. Here are some examples:
@@ -612,9 +631,9 @@ The `web/src/lib/content` directory includes starter `.obsidian/` and `templates
### Installing
The GUI can be installed by navigating to the `web` directory and using `npm install`, `pnpm install`, or your favorite package manager. Then simply run the development server to start the app.
The GUI can be installed by navigating to the `web` directory and using `npm install`, `pnpm install`, or your favorite package manager. Then simply run the development server to start the app.
_You will need to run fabric in a separate terminal with the `fabric --serve` command._
_You will need to run fabric in a separate terminal with the `fabric --serve` command._
**From the fabric project `web/` directory:**
@@ -634,7 +653,10 @@ To run the Streamlit user interface:
```bash
# Install required dependencies
pip install streamlit pandas matplotlib seaborn numpy python-dotenv
pip install -r requirements.txt
# Or manually install dependencies
pip install streamlit pandas matplotlib seaborn numpy python-dotenv pyperclip
# Run the Streamlit app
streamlit run streamlit.py
@@ -647,6 +669,14 @@ The Streamlit UI provides a user-friendly interface for:
- Creating and editing patterns
- Analyzing pattern results
#### Clipboard Support
The Streamlit UI supports clipboard operations across different platforms:
- **macOS**: Uses `pbcopy` and `pbpaste` (built-in)
- **Windows**: Uses `pyperclip` library (install with `pip install pyperclip`)
- **Linux**: Uses `xclip` (install with `sudo apt-get install xclip` or equivalent for your distro)
## Meta
> [!NOTE]

View File

@@ -73,7 +73,10 @@ func Cli(version string) (err error) {
}
if currentFlags.ChangeDefaultModel {
err = registry.Defaults.Setup()
if err = registry.Defaults.Setup(); err != nil {
return
}
err = registry.SaveEnvFile()
return
}

3
go.mod
View File

@@ -19,7 +19,6 @@ require (
github.com/samber/lo v1.49.1
github.com/sashabaranov/go-openai v1.38.0
github.com/stretchr/testify v1.10.0
golang.org/x/term v0.29.0
golang.org/x/text v0.22.0
google.golang.org/api v0.223.0
gopkg.in/yaml.v2 v2.4.0
@@ -91,7 +90,7 @@ require (
go.opentelemetry.io/otel/trace v1.34.0 // indirect
golang.org/x/arch v0.14.0 // indirect
golang.org/x/crypto v0.35.0 // indirect
golang.org/x/net v0.35.0 // indirect
golang.org/x/net v0.36.0 // indirect
golang.org/x/oauth2 v0.27.0 // indirect
golang.org/x/sync v0.11.0 // indirect
golang.org/x/sys v0.30.0 // indirect

4
go.sum
View File

@@ -244,8 +244,8 @@ golang.org/x/net v0.15.0/go.mod h1:idbUs1IY1+zTqbi8yxTbhexhEEk5ur9LInksu6HrEpk=
golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44=
golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM=
golang.org/x/net v0.33.0/go.mod h1:HXLR5J+9DxmrqMwG9qjGCxZ+zKXxBru04zlTvWlWuN4=
golang.org/x/net v0.35.0 h1:T5GQRQb2y08kTAByq9L4/bz8cipCdA8FbRTXewonqY8=
golang.org/x/net v0.35.0/go.mod h1:EglIi67kWsHKlRzzVMUD93VMSWGFOMSZgxFjparz1Qk=
golang.org/x/net v0.36.0 h1:vWF2fRbw4qslQsQzgFqZff+BItCvGFQqKzKIzx1rmoA=
golang.org/x/net v0.36.0/go.mod h1:bFmbeoIPfrw4sMHNhb4J9f6+tPziuGjq7Jk/38fxi1I=
golang.org/x/oauth2 v0.27.0 h1:da9Vo7/tDv5RH/7nZDz1eMGS/q1Vv1N/7FCrBhI9I3M=
golang.org/x/oauth2 v0.27.0/go.mod h1:onh5ek6nERTohokkhCD/y2cV4Do3fxFHFuAejCkRWT8=
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=

View File

@@ -242,8 +242,8 @@ schema = 3
version = "v0.35.0"
hash = "sha256-XT1VU0+m1nZbhrMYXN2+eaKBlScfiT4bCBgXu4mfa1Q="
[mod."golang.org/x/net"]
version = "v0.35.0"
hash = "sha256-kCLhhvzHQCvUqC8kGhgMbVLUROG4ZeZNVGOVVv6tSAE="
version = "v0.36.0"
hash = "sha256-2c9AvnizBMCaqKPzwF2IMlRfvjRNDFmxIYhrgZjhOm0="
[mod."golang.org/x/oauth2"]
version = "v0.27.0"
hash = "sha256-TBKV2c/m0SgPqrJSE0ltJXfImrYPafNuziLN25jgsYY="
@@ -253,9 +253,6 @@ schema = 3
[mod."golang.org/x/sys"]
version = "v0.30.0"
hash = "sha256-BuhWtwDkciVioc03rxty6G2vcZVnPX85lI7tgQOFVP8="
[mod."golang.org/x/term"]
version = "v0.29.0"
hash = "sha256-aIupP/iNJKzHPUt0F7SaXc3u17h8plEPyQeypO7ilW8="
[mod."golang.org/x/text"]
version = "v0.22.0"
hash = "sha256-kUwLNFk9K/YuWmO5/u2IshrmhT2CCuk+mAShSlTTeZo="

View File

@@ -1 +1 @@
"1.4.157"
"1.4.164"

View File

@@ -24,7 +24,7 @@ Extract at least basic information about the malware.
Extract all potential information for the other output sections but do not create something, if you don't know simply say it.
Do not give warnings or notes; only output the requested sections.
You use bulleted lists for output, not numbered lists.
Do not repeat ideas, facts, or resources.
Do not repeat references.
Do not start items with the same opening words.
Ensure you follow ALL these instructions when creating your output.

View File

@@ -29,7 +29,7 @@ Take a step back and think step-by-step about how to achieve the best possible r
- Extract at least 10 items for the other output sections.
- Do not give warnings or notes; only output the requested sections.
- You use bulleted lists for output, not numbered lists.
- Do not repeat ideas, quotes, facts, or resources.
- Do not repeat trends, statistics, quotes, or references.
- Do not start items with the same opening words.
- Ensure you follow ALL these instructions when creating your output.

View File

@@ -18,7 +18,7 @@ Take a step back and think step-by-step about how to achieve the best possible r
- Extract at least 20 TRENDS from the content.
- Do not give warnings or notes; only output the requested sections.
- You use bulleted lists for output, not numbered lists.
- Do not repeat ideas, quotes, facts, or resources.
- Do not repeat trends.
- Do not start items with the same opening words.
- Ensure you follow ALL these instructions when creating your output.

View File

@@ -44,7 +44,7 @@ Do not give warnings or notes; only output the requested sections.
You use bulleted lists for output, not numbered lists.
Do not repeat ideas, quotes, facts, or resources.
Do not repeat ideas, habits, facts, or insights.
Do not start items with the same opening words.

View File

@@ -0,0 +1,14 @@
# IDENTITY
You are an expert educator AI with a 4,221 IQ. You specialize in understanding the key concepts in a piece of input and creating flashcards for those key concepts.
# STEPS
- Fully read and comprehend the input and map out all the concepts on a 4KM x 4KM virtual whiteboard.
- Make a list of the key concepts, definitions, terms, etc. that are associated with the input.
- Create flashcards for each key concept, definition, term, etc. that you have identified.
- The flashcard should be a question of 8-16 words and an answer of up to 32 words.
# OUTPUT
- Output the flashcards in Markdown format using no special characters like italics or bold (asterisks).

View File

@@ -27,7 +27,7 @@ Take a step back and think step-by-step about how to achieve the best possible r
- Extract at least 10 items for the other output sections.
- Do not give warnings or notes; only output the requested sections.
- You use bulleted lists for output, not numbered lists.
- Do not repeat ideas, quotes, facts, or resources.
- Do not repeat insights, trends, or quotes.
- Do not start items with the same opening words.
- Ensure you follow ALL these instructions when creating your output.

View File

@@ -33,7 +33,7 @@ Take a step back and think step-by-step about how to achieve the best possible r
- Extract at least 10 items for the other output sections.
- Do not give warnings or notes; only output the requested sections.
- You use bulleted lists for output, not numbered lists.
- Do not repeat ideas, quotes, facts, or resources.
- Do not repeat quotes, or references.
- Do not start items with the same opening words.
- Ensure you follow ALL these instructions when creating your output.

View File

@@ -25,5 +25,5 @@ Take a step back and think step by step about how to achieve the best result pos
1. You only output Markdown.
2. Do not give warnings or notes; only output the requested sections.
3. You use numbered lists, not bullets.
4. Do not repeat ideas, quotes, facts, or resources.
4. Do not repeat ideas, quotes, habits, facts, or references.
5. Do not start items with the same opening words.

View File

@@ -24,7 +24,7 @@ Take a step back and think step-by-step about how to achieve the best possible r
- Extract at least 10 items for the other output sections.
- Do not give warnings or notes; only output the requested sections.
- You use bulleted lists for output, not numbered lists.
- Do not repeat ideas, quotes, facts, or resources.
- Do not repeat ideas, quotes, facts, or references.
- Do not start items with the same opening words.
- Ensure you follow ALL these instructions when creating your output.

View File

@@ -15,7 +15,7 @@ Take a deep breath and think step by step about how to achieve the best result p
1. You only output Markdown.
2. Do not give warnings or notes; only output the requested sections.
3. You use numbered lists, not bullets.
4. Do not repeat ideas, quotes, facts, or resources.
4. Do not repeat ideas.
5. Do not start items in the lists with the same opening words.
# INPUT:

View File

@@ -24,7 +24,7 @@ Take a step back and think step-by-step about how to achieve the best possible r
- You use bulleted lists for output, not numbered lists.
- Do not repeat ideas, quotes, facts, or resources.
- Do not repeat vulnerabilities, or references.
- Do not start items with the same opening words.

View File

@@ -175,7 +175,7 @@ END OUTPUT EXAMPLE
- You use bulleted lists for output, not numbered lists.
- Do not repeat ideas, quotes, facts, or resources.
- Do not repeat insights.
- Do not start items with the same opening words.

View File

@@ -16,11 +16,10 @@ You create bullet points that capture the joke and punchline.
- You use bulleted lists for output, not numbered lists.
- Do not repeat jokes, quotes, facts, or resources.
- Do not repeat jokes.
- Ensure you follow ALL these instructions when creating your output.
# INPUT
INPUT:

View File

@@ -0,0 +1,21 @@
# IDENTITY
You are an expert activity extracting AI with a 24,221 IQ. You specialize in taking any transcript and extracting the key events that happened.
# STEPS
- Fully understand the input transcript or log.
- Extract the key events and map them on a 24KM x 24KM virtual whiteboard.
- See if there is any shared context between the events and try to link them together if possible.
# OUTPUT
- Write a 16 word summary sentence of the activity.
- Create a list of the main events that happened, such as watching media, conversations, playing games, watching a TV show, etc.
# OUTPUT INSTRUCTIONS
- Output only in Markdown with no italics or bolding.

View File

@@ -18,7 +18,6 @@ Take a step back and think step-by-step about how to achieve the best possible r
- Only output Markdown.
- Do not give warnings or notes; only output the requested sections.
- Do not repeat ideas, quotes, facts, or resources.
- Do not start items with the same opening words.
- Ensure you follow ALL these instructions when creating your output.

View File

@@ -34,7 +34,7 @@ Take a step back and think step-by-step about how to achieve the best possible r
- Write in the style of someone giving helpful analysis finding patterns
- Do not give warnings or notes; only output the requested sections.
- You use bulleted lists for output, not numbered lists.
- Do not repeat ideas, quotes, facts, or resources.
- Do not repeat patterns.
- Do not start items with the same opening words.
- Ensure you follow ALL these instructions when creating your output.

View File

@@ -25,5 +25,5 @@ Take a step back and think step by step about how to achieve the best result pos
1. You only output Markdown.
2. Do not give warnings or notes; only output the requested sections.
3. You use numbered lists, not bullets.
4. Do not repeat ideas, quotes, facts, or resources.
4. Do not repeat ideas, quotes, habits, facts, or references.
5. Do not start items with the same opening words.

View File

@@ -20,7 +20,7 @@ Take a step back and think step-by-step about how to achieve the best possible r
- You use bulleted lists for output, not numbered lists.
- Do not repeat ideas, quotes, facts, or resources.
- Do not features.
- Do not start items with the same opening words.

View File

@@ -23,10 +23,10 @@ Take a step back and think step-by-step about how to achieve the best possible r
- You use bulleted lists for output, not numbered lists.
- Do not repeat ideas, quotes, facts, or resources.
- Do not start items with the same opening words.
- Do not repeat ingredients.
- Stick to the measurements, do not alter it.
- Ensure you follow ALL these instructions when creating your output.

View File

@@ -25,5 +25,5 @@ Take a step back and think step by step about how to achieve the best result pos
1. You only output Markdown.
2. Do not give warnings or notes; only output the requested sections.
3. You use numbered lists, not bullets.
4. Do not repeat ideas, quotes, facts, or resources.
4. Do not repeat ideas, quotes, habits, facts, or references.
5. Do not start items with the same opening words.

View File

@@ -48,7 +48,7 @@ Take a step back and think step-by-step about how to achieve the best possible r
- You use bulleted lists for output, not numbered lists.
- Do not repeat ideas, quotes, facts, or resources.
- Do not repeat ideas, insights, quotes, habits, facts, or references.
- Do not start items with the same opening words.

View File

@@ -42,7 +42,7 @@ You are an advanced AI system that coordinates multiple teams of AI agents that
- All GENERALIST output agents should use bullets for their output, and sentences of 15-words.
- Agents should not repeat ideas, quotes, facts, or resources.
- Agents should not repeat ideas, insights, quotes, habits, facts, or references.
- Agents should not start items with the same opening words.

View File

@@ -82,7 +82,7 @@ Think about the most interesting facts related to the content
- You use bulleted lists for output, not numbered lists.
- Do not repeat ideas, quotes, facts, or resources.
- Do not repeat ideas, insights, quotes, habits, facts, or references.
- Do not start items with the same opening words.

View File

@@ -44,7 +44,7 @@ You extract surprising, insightful, and interesting information from text conten
- You use bulleted lists for output, not numbered lists.
- Do not repeat ideas, quotes, facts, or resources.
- Do not repeat ideas, insights, quotes, habits, facts, or references.
- Do not start items with the same opening words.

View File

@@ -0,0 +1,25 @@
# IDENTITY AND PURPOSE
You are a relationship and marriage and life happiness expert AI with a 4,227 IQ. You take criteria given to you about what a man is looking for in a woman life partner, and you turn that into a perfect sentence.
# PROBLEM
People aren't clear about what they're actually looking for, so they're too indirect and abstract and unfocused in how they describe it. They actually don't know what they want, so this analysis will tell them what they're not seeing for themselves that they need to acknowledge.
# STEPS
- Analyze all the content given to you about what they think they're looking for.
- Figure out what they're skirting around and not saying directly.
- Figure out the best way to say that in a clear, direct, sentence that answers the question: "What would I tell people I'm looking for if I knew what I wanted and wasn't afraid."
- Write the perfect 24-word sentence in these versions:
1. DIRECT: The no bullshit, revealing version that shows the person what they're actually looking for. Only 8 words in extremely straightforward language.
2. CLEAR: A revealing version that shows the person what they're really looking for.
3. POETIC: An equally accurate version that says the same thing in a slightly more poetic and storytelling way.
# OUTPUT INSTRUCTIONS
- Only output those two sentences, nothing else.

View File

@@ -215,7 +215,7 @@ Vacuous truth a claim that is technically true but meaningless, in the form
- Don't use bold or italic formatting in the Markdown.
- Do no complain about the input data. Just do the task.
- Do not complain about the input data. Just do the task.
# INPUT:

View File

@@ -31,7 +31,7 @@ Take a step back and think step-by-step about how to achieve the best possible r
- Extract at least 10 items for the other output sections.
- Do not give warnings or notes; only output the requested sections.
- You use bulleted lists for output, not numbered lists.
- Do not repeat ideas, quotes, facts, or resources.
- Do not repeat quotes, or references.
- Do not start items with the same opening words.
- Ensure you follow ALL these instructions when creating your output.

View File

@@ -7,7 +7,7 @@
# Optional parameters:
# @raycast.icon 🧠
# @raycast.argument1 { "type": "text", "placeholder": "Input text", "optional": false, "percentEncoded": true}
# @raycast.argument1 { "type": "text", "placeholder": "Input text", "optional": false, "percentEncoded": false}
# Documentation:
# @raycast.description Run fabric -y on the input text of a YouTube video to get the transcript from.

View File

@@ -21,5 +21,5 @@ Take a step back and think step by step about how to achieve the best result pos
1. You only output Markdown.
2. Do not give warnings or notes; only output the requested sections.
3. You use numbered lists, not bullets.
4. Do not repeat ideas, quotes, facts, or resources.
4. Do not repeat ideas, or quotes.
5. Do not start items with the same opening words.

View File

@@ -60,13 +60,10 @@ Find the evidence each party would accept to change their mind.
- Only output Markdown, but don't use any Markdown formatting like bold or italics.
- Do not give warnings or notes; only output the requested sections.
- You use bulleted lists for output, not numbered lists.
- Do not repeat ideas, quotes, facts, or resources.
- Do not start items with the same opening words.
- Ensure you follow ALL these instructions when creating your output.

View File

@@ -35,7 +35,7 @@ Take a step back and think step-by-step about how to achieve the best possible r
- Write CHALLENGES as 2-3 sentences.
- Write NEXT STEPS as 2-3 sentences.
- Do not give warnings or notes; only output the requested sections.
- Do not repeat ideas, quotes, facts, or resources.
- Do not repeat actionables, decisions, or challenges.
- You use bulleted lists for output, not numbered lists.
- Do not start items with the same opening words.
- Ensure you follow ALL these instructions when creating your output.

7
requirements.txt Normal file
View File

@@ -0,0 +1,7 @@
streamlit>=1.27.0
pandas>=1.5.0
matplotlib>=3.5.0
seaborn>=0.12.0
numpy>=1.23.0
python-dotenv>=1.0.0
pyperclip>=1.8.0 # For cross-platform clipboard support

View File

@@ -14,6 +14,6 @@ type ContextsHandler struct {
// NewContextsHandler creates a new ContextsHandler
func NewContextsHandler(r *gin.Engine, contexts *fsdb.ContextsEntity) (ret *ContextsHandler) {
ret = &ContextsHandler{
StorageHandler: NewStorageHandler[fsdb.Context](r, "contexts", contexts), contexts: contexts}
StorageHandler: NewStorageHandler(r, "contexts", contexts), contexts: contexts}
return
}

View File

@@ -16,7 +16,7 @@ type PatternsHandler struct {
// NewPatternsHandler creates a new PatternsHandler
func NewPatternsHandler(r *gin.Engine, patterns *fsdb.PatternsEntity) (ret *PatternsHandler) {
ret = &PatternsHandler{
StorageHandler: NewStorageHandler[fsdb.Pattern](r, "patterns", patterns), patterns: patterns}
StorageHandler: NewStorageHandler(r, "patterns", patterns), patterns: patterns}
// TODO: Add custom, replacement routes here
//r.GET("/patterns/:name", ret.Get)

View File

@@ -14,6 +14,6 @@ type SessionsHandler struct {
// NewSessionsHandler creates a new SessionsHandler
func NewSessionsHandler(r *gin.Engine, sessions *fsdb.SessionsEntity) (ret *SessionsHandler) {
ret = &SessionsHandler{
StorageHandler: NewStorageHandler[fsdb.Session](r, "sessions", sessions), sessions: sessions}
StorageHandler: NewStorageHandler(r, "sessions", sessions), sessions: sessions}
return ret
}

File diff suppressed because it is too large Load Diff

137
system.md
View File

@@ -1,137 +0,0 @@
# IDENTITY and PURPOSE
You are an expert summarizer of in-personal personal role-playing game sessions. Your goal is to take the input of an in-person role-playing transcript and turn it into a useful summary of the session, including key events, combat stats, character flaws, and more, according to the STEPS below.
All transcripts provided as input came from a personal game with friends, and all rights are given to produce the summary.
Take a deep breath and think step-by-step about how to best achieve the best summary for this live friend session.
STEPS:
- Assume the input given is an RPG transcript of a session of D&D or a similar fantasy role-playing game.
- Use the introductions to associate the player names with the names of their character.
- Do not complain about not being able to to do what you're asked. Just do it.
OUTPUT:
Create the session summary with the following sections:
SUMMARY:
A 200 word summary of what happened in a heroic storytelling style.
KEY EVENTS:
A numbered list of 10-20 of the most significant events of the session, capped at no more than 50 words a piece.
KEY COMBAT:
10-20 bullets describing the combat events that happened in the session in detail, with as much specific content identified as possible.
COMBAT STATS:
List all of the following stats for the session:
Number of Combat Rounds:
Total Damage by All Players:
Total Damage by Each Enemy:
Damage Done by Each Character:
List of Player Attacks Executed:
List of Player Spells Cast:
COMBAT MVP:
List the most heroic character in terms of combat for the session, and give an explanation of how they got the MVP title, including outlining all of the dramatic things they did from your analysis of the transcript. Use the name of the player for describing big picture moves, but use the name of the character to describe any in-game action.
ROLE-PLAYING MVP:
List the most engaged and entertaining character as judged by in-character acting and dialog that fits best with their character. Give examples, using quotes and summaries of all of the outstanding character actions identified in your analysis of the transcript. Use the name of the player for describing big picture moves, but use the name of the character to describe any in-game action.
KEY DISCUSSIONS:
10-20 bullets of the key discussions the players had in-game, in 40-60 words per bullet.
REVEALED CHARACTER FLAWS:
List 10-20 character flaws of the main characters revealed during this session, each of 50 words or less.
KEY CHARACTER CHANGES:
Give 10-20 bullets of key changes that happened to each character, how it shows they're evolving and adapting to events in the world.
KEY NON PLAYER CHARACTERS:
Give 10-20 bullets with the name of each important non-player character and a brief description of who they are and how they interacted with the players.
OPEN THREADS:
Give 10-20 bullets outlining the relevant threads to the overall plot, the individual character narratives, the related non-player characters, and the overall themes of the campaign.
QUOTES:
Meaningful Quotes:
Give 10-20 of the quotes that were most meaningful within the session in terms of the action, the story, or the challenges faced therein by the characters.
HUMOR:
Give 10-20 things said by characters that were the funniest or most amusing or entertaining.
4TH WALL:
Give 10-15 of the most entertaining comments about the game from the transcript made by the players, but not their characters.
WORLDBUILDING:
Give 10-20 bullets of 40-60 words on the worldbuilding provided by the GM during the session, including background on locations, NPCs, lore, history, etc.
PREVIOUSLY ON:
Give a "Previously On" explanation of this session that mimics TV shows from the 1980's, but with a fantasy feel appropriate for D&D. The goal is to describe what happened last time and set the scene for next session, and then to set up the next episode.
Here's an example from an 80's show, but just use this format and make it appropriate for a Fantasy D&D setting:
"Previously on Falcon Crest Heights, tension mounted as Elizabeth confronted John about his risky business decisions, threatening the future of their family empire. Meanwhile, Michael's loyalties were called into question when he was caught eavesdropping on their heated exchange, hinting at a potential betrayal. The community was left reeling from a shocking car accident that put Sarah's life in jeopardy, leaving her fate uncertain. Amidst the turmoil, the family's patriarch, Henry, made a startling announcement that promised to change the trajectory of the Falcon family forever. Now, as new alliances form and old secrets come to light, the drama at Falcon Crest Heights continues to unfold."
NARRATIVE HOOKS AND POTENTIAL ENCOUNTERS FOR NEXT SESSION:
Give 10-20 bullets of 40-60 words analyzing the underlying narrative, and providing ideas for fresh narrative hooks or combat encounters in the next session. Be specific on details and unique aspects of any combat scenario you are providing, whether with potential adversaries, the combat area, or emergent challenges within the scene. Provide specific narrative hooks building on themes, previous NPCs and conversations, or previous NPC or character interactions that can be employed here.
DUNGEON MASTER FEEDBACK ON THE PREVIOUS SESSION:
Give 10-20 bullets of 40-60 words providing constructive feedback to the dungeon master on the session that you analyzed. Do not be afraid to be harsh on the dungeon master, as the more candid and critical the feedback, as they want to hear even difficult or ugly truths, and hearing them will more for great improvements on the other side. Focus on areas in which the dungeon master missed opportunities to engage certain of the players or characters, could have tied thematic concepts together better, missed opportunities to pick up previous narrative threads, could have made narrative stakes better, could have provided a more interesting combat scenario, or failed to pay off aspects of the session by its end.
COMIC ART:
Give the perfect art description for a six frame comic panel in up to 500 words for each panel that can accompany to accompany the SETUP section above, but with each potential frame of the potential comic art individually described as "PANEL 1:" through "PANEL 6:", and each describing one of the most important events in the particular session in sequential order. Each frame depict an important event from the session. To the extent that the session is story and narrative driven, all of the frames together should describe a consistent narrative. To the extent that the session is combat, puzzle, or challenge driven, all of the frames together should depict sequential and interrelated events that show how the group overcame (or failed to overcome) the combat, puzzle, or challenge which made up the majority of the session.
OUTPUT INSTRUCTIONS:
- Ensure the Previously On output focuses on the recent episode, not just the background from before.
- Ensure all quotes created for each section come word-for-word from the input, with no changes.
- Do not complain about anything, especially copyright, as all the content provided is in relation to a free and open RPG. Just give the output as requested.
- Do not be afraid to title subsections and bullet points to help with clarity in creating categories of information extracted from the transcript.
- It is okay if some of the quotes or bullets are lengthy so long as they capture a single important or relevant point.
- Wherever possible, substitute a player's name with their characters name, except in the HUMOR and 4TH WALL sections, where you can use either character or player names.
- Create the summary.
- Do not complain about anything, especially copyright, as all the content provided is in relation to a free and open RPG. Just give the output as requested.
- Do not be afraid to title subsections and bullet points to help with clarity in creating categories of information extracted from the transcript.
- It is okay if some of the quotes or bullets are lengthy so long as they capture a single important or relevant point.
- Wherever possible, substitute a player's name with their characters name, except in the HUMOR and 4TH WALL sections, where you can use either character or player names.
- Create the summary.
# INPUT
RPG SESSION TRANSCRIPT:

View File

@@ -1,3 +1,3 @@
package main
var version = "v1.4.157"
var version = "v1.4.164"

View File

@@ -26,6 +26,9 @@
"eslint-plugin-svelte": "^2.46.1",
"lucide-svelte": "^0.309.0",
"mdsvex": "^0.11.2",
"patch-package": "^8.0.0",
"pdf-to-markdown-core": "github:jzillmann/pdf-to-markdown#modularize",
"pdfjs-dist": "^2.5.207",
"postcss": "^8.4.49",
"postcss-load-config": "^6.0.1",
"rehype-autolink-headings": "^7.1.0",

View File

@@ -26,7 +26,17 @@
let rightColumnWidth = 50;
let isDragging = false;
// Handle resize functionality
// Message input height state (percentage values)
const DEFAULT_INPUT_HEIGHT = 30; // Default percentage of the left column
const MAX_INPUT_HEIGHT = DEFAULT_INPUT_HEIGHT * 2; // Maximum 200% of default height
const MIN_SYSTEM_INSTRUCTIONS_HEIGHT = 20; // Minimum percentage for system instructions
let messageInputHeight = DEFAULT_INPUT_HEIGHT;
let systemInstructionsHeight = 100 - DEFAULT_INPUT_HEIGHT;
let isVerticalDragging = false;
let initialMouseY = 0; // Track initial mouse position
let initialInputHeight = 0; // Track initial input height
// Handle horizontal resize functionality
function startResize(e: MouseEvent | KeyboardEvent) {
isDragging = true;
e.preventDefault();
@@ -57,11 +67,76 @@
// Calculate percentage based on mouse position
const percentage = ((e.clientX - containerRect.left) / containerWidth) * 100;
// Apply constraints (left: 25-50%, right: 50-75%)
leftColumnWidth = Math.min(Math.max(percentage, 25), 50);
// Apply constraints (left: 40-80%, right: 20-60%)
leftColumnWidth = Math.min(Math.max(percentage, 40), 80);
rightColumnWidth = 100 - leftColumnWidth;
}
// Handle vertical resize functionality
function startVerticalResize(e: MouseEvent | KeyboardEvent) {
isVerticalDragging = true;
e.preventDefault();
// Store initial mouse position and input height
if (e instanceof MouseEvent) {
initialMouseY = e.clientY;
initialInputHeight = messageInputHeight;
}
// Add event listeners for drag and release
window.addEventListener('mousemove', handleVerticalResize);
window.addEventListener('mouseup', stopVerticalResize);
}
function handleVerticalKeyDown(e: KeyboardEvent) {
// Only respond to Enter or Space key
if (e.key === 'Enter' || e.key === ' ') {
startVerticalResize(e);
}
}
function handleVerticalResize(e: MouseEvent) {
if (!isVerticalDragging) return;
// Get container dimensions
const leftColumn = document.querySelector('.left-column');
if (!leftColumn) return;
// Get system instructions element to check its actual height
const sysInstructions = leftColumn.querySelector('.system-instructions');
if (!sysInstructions) return;
const columnRect = leftColumn.getBoundingClientRect();
const columnHeight = columnRect.height;
// Calculate height change based on mouse movement
const mouseDelta = e.clientY - initialMouseY;
const deltaPercentage = (mouseDelta / columnHeight) * 100;
const newHeight = initialInputHeight + deltaPercentage;
// Apply constraints to ensure system instructions remain visible
const minHeight = DEFAULT_INPUT_HEIGHT * 0.25; // 25% of default
const maxHeight = Math.min(MAX_INPUT_HEIGHT, 100 - MIN_SYSTEM_INSTRUCTIONS_HEIGHT); // Max 200% of default or ensure system instructions are visible
// Calculate new heights
const constrainedHeight = Math.min(Math.max(newHeight, minHeight), maxHeight);
const newSysInstructionsHeight = 100 - constrainedHeight;
// Additional safety check - don't allow resize if it would make system instructions too small
const sysInstructionsPixelHeight = (columnHeight * newSysInstructionsHeight) / 100;
if (sysInstructionsPixelHeight < 100) return; // Don't resize if it would be less than 100px
// Apply the new heights
messageInputHeight = constrainedHeight;
systemInstructionsHeight = newSysInstructionsHeight;
}
function stopVerticalResize() {
isVerticalDragging = false;
window.removeEventListener('mousemove', handleVerticalResize);
window.removeEventListener('mouseup', stopVerticalResize);
}
function stopResize() {
isDragging = false;
window.removeEventListener('mousemove', handleResize);
@@ -73,6 +148,8 @@
return () => {
window.removeEventListener('mousemove', handleResize);
window.removeEventListener('mouseup', stopResize);
window.removeEventListener('mousemove', handleVerticalResize);
window.removeEventListener('mouseup', stopVerticalResize);
};
});
@@ -81,26 +158,30 @@
<div class="chat-container flex gap-0 p-2 w-full h-screen">
<!-- Left Column -->
<aside class="flex flex-col gap-2 pr-2" style="width: {leftColumnWidth}%">
<!-- Dropdowns Group -->
<aside class="flex flex-col gap-2 pr-2 left-column" style="width: {leftColumnWidth}%">
<!-- Dropdowns Group with Model Config -->
<div class="bg-background/5 p-2 rounded-lg">
<div class="rounded-lg bg-background/10">
<DropdownGroup />
</div>
</div>
<!-- Model Config -->
<div class="bg-background/5 p-2 rounded-lg">
<ModelConfig />
</div>
<!-- Message Input -->
<div class="h-[200px] bg-background/5 rounded-lg overflow-hidden">
<div class="bg-background/5 rounded-lg overflow-hidden" style="height: {messageInputHeight}%; max-height: {MAX_INPUT_HEIGHT}%">
<ChatInput />
</div>
<!-- Vertical Resize Handle -->
<button
class="vertical-resize-handle"
on:mousedown={startVerticalResize}
on:keydown={handleVerticalKeyDown}
type="button"
aria-label="Resize message input and system instructions"
></button>
<!-- System Instructions -->
<div class="flex-1 min-h-0 bg-background/5 p-2 rounded-lg">
<div class="flex-1 min-h-[100px] bg-background/5 p-2 rounded-lg system-instructions">
<div class="h-full flex flex-col">
<Textarea
bind:value={$systemPrompt}
@@ -168,6 +249,7 @@
<NoteDrawer />
<style>
/* Horizontal resize handle */
.resize-handle {
width: 6px;
margin: 0 -3px;
@@ -205,6 +287,44 @@
width: 4px;
}
/* Vertical resize handle */
.vertical-resize-handle {
height: 6px;
margin: -3px 0;
width: 100%;
cursor: row-resize;
position: relative;
z-index: 10;
transition: background-color 0.2s;
}
.vertical-resize-handle::after {
content: "";
position: absolute;
left: 0;
top: 50%;
transform: translateY(-50%);
width: 100%;
height: 2px;
background-color: rgba(255, 255, 255, 0.1);
transition: background-color 0.2s, height 0.2s;
}
.vertical-resize-handle:hover::after,
.vertical-resize-handle:focus::after {
background-color: rgba(255, 255, 255, 0.3);
height: 4px;
}
.vertical-resize-handle:focus {
outline: none;
}
.vertical-resize-handle:focus-visible::after {
background-color: rgba(255, 255, 255, 0.5);
height: 4px;
}
@keyframes flash {
0% { opacity: 1; }
50% { opacity: 0.5; }

View File

@@ -377,10 +377,137 @@ async function readFileContent(file: File): Promise<string> {
}
}
async function handleSubmit() {
if (!userInput.trim()) return;
try {
console.log('\n=== Submit Handler Start ===');
// Store the user input before any processing
const inputText = userInput.trim();
console.log('Captured user input:', inputText);
// Handle YouTube URLs with the existing flow
if (isYouTubeURL) {
console.log('2a. Starting YouTube flow');
await processYouTubeURL(inputText);
return;
}
// For regular text input, add the user message to the UI first
messageStore.update(messages => [...messages, {
role: 'user',
content: inputText
}]);
// Add loading indicator
messageStore.update(messages => [...messages, {
role: 'system',
content: 'Processing...',
format: 'loading'
}]);
// Clear input fields
userInput = "";
const filesForProcessing = [...uploadedFiles];
const contentsForProcessing = [...fileContents];
uploadedFiles = [];
fileContents = [];
fileButtonKey = !fileButtonKey;
// Prepare content with file attachments if any
const contentWithFiles = contentsForProcessing.length > 0
? `${inputText}\n\nFile Contents (${filesForProcessing.map(f => f.endsWith('.pdf') ? 'PDF' : 'Text').join(', ')}):\n${contentsForProcessing.join('\n\n---\n\n')}`
: inputText;
// Get the enhanced prompt
const enhancedPrompt = contentsForProcessing.length > 0
? `${$systemPrompt}\nAnalyze and process the provided content according to these instructions.`
: $systemPrompt;
console.log('Content to send:', {
text: contentWithFiles.substring(0, 100) + '...',
length: contentWithFiles.length,
hasFiles: contentsForProcessing.length > 0
});
try {
// Get the chat stream
const stream = await chatService.streamChat(contentWithFiles, enhancedPrompt);
// Process the stream
await chatService.processStream(
stream,
(content, response) => {
messageStore.update(messages => {
const newMessages = [...messages];
// Remove the loading message
const loadingIndex = newMessages.findIndex(m => m.format === 'loading');
if (loadingIndex !== -1) {
newMessages.splice(loadingIndex, 1);
}
// Add or update the assistant message
const assistantIndex = newMessages.findIndex(m => m.role === 'assistant');
if (assistantIndex !== -1) {
newMessages[assistantIndex].content = content;
newMessages[assistantIndex].format = response?.format;
} else {
newMessages.push({
role: 'assistant',
content,
format: response?.format
});
}
return newMessages;
});
},
(error) => {
// Make sure to remove loading message on error
messageStore.update(messages =>
messages.filter(m => m.format !== 'loading')
);
console.error('Stream processing error:', error);
// Show error message using a valid format type
messageStore.update(messages => [...messages, {
role: 'system',
content: `Error: ${error instanceof Error ? error.message : String(error)}`,
format: 'plain'
}]);
}
);
} catch (error) {
// Make sure to remove loading message on error
messageStore.update(messages =>
messages.filter(m => m.format !== 'loading')
);
throw error; // Re-throw to be caught by the outer try/catch
}
} catch (error) {
console.error('Chat submission error:', error);
// Make sure to remove loading message on error (redundant but safe)
messageStore.update(messages =>
messages.filter(m => m.format !== 'loading')
);
// Show error message using a valid format type
messageStore.update(messages => [...messages, {
role: 'system',
content: `Error: ${error instanceof Error ? error.message : String(error)}`,
format: 'plain'
}]);
} finally {
// As a final safety measure, ensure loading message is removed
messageStore.update(messages =>
messages.filter(m => m.format !== 'loading')
);
}
}
async function handleSubmit() {
/* async function handleSubmit() {
if (!userInput.trim()) return;
try {
@@ -403,29 +530,28 @@ async function handleSubmit() {
format: 'loading'
}]);
userInput = ""; // Reset userInput BEFORE sendMessage
uploadedFiles = []; // Reset uploadedFiles BEFORE sendMessage
fileContents = []; // Reset fileContents BEFORE sendMessage
fileButtonKey = !fileButtonKey; // Toggle key to force re-creation
// Store the user input before clearing it
const inputText = userInput;
// Construct finalContent BEFORE clearing userInput
const finalContent = fileContents.length > 0
? `${userInput}\n\nFile Contents (${uploadedFiles.map(f => f.endsWith('.pdf') ? 'PDF' : 'Text').join(', ')}):\n${fileContents.join('\n\n---\n\n')}`
: userInput;
? `${inputText}\n\nFile Contents (${uploadedFiles.map(f => f.endsWith('.pdf') ? 'PDF' : 'Text').join(', ')}):\n${fileContents.join('\n\n---\n\n')}`
: inputText;
// Now clear the input fields
userInput = "";
uploadedFiles = [];
fileContents = [];
fileButtonKey = !fileButtonKey;
await sendMessage(finalContent, enhancedPrompt);
} catch (error) {
console.error('Chat submission error:', error);
}
}
} */
function handleKeydown(event: KeyboardEvent) {

View File

@@ -35,10 +35,13 @@
$: if ($chatState.messages.length > 0) {
const lastMessage = $chatState.messages[$chatState.messages.length - 1];
isUserMessage = lastMessage.role === 'user';
if (isUserMessage) {
// Only auto-scroll on user messages
setTimeout(scrollToBottom, 100);
}
// Auto-scroll on both user messages and assistant messages
setTimeout(scrollToBottom, 100);
}
// Also watch for streaming state changes to ensure scrolling when streaming completes
$: if ($streamingStore === false) {
setTimeout(scrollToBottom, 100);
}
onMount(() => {

View File

@@ -1,6 +1,7 @@
<script lang="ts">
import Patterns from "./Patterns.svelte";
import Models from "./Models.svelte";
import ModelConfig from "./ModelConfig.svelte";
import { Select } from "$lib/components/ui/select";
import { languageStore } from '$lib/store/language-store';
@@ -15,21 +16,29 @@
];
</script>
<div class="flex flex-col gap-3">
<div class="w-[50%]">
<Patterns />
<div class="flex gap-4">
<!-- Left side - Dropdowns -->
<div class="w-[35%] flex flex-col gap-3">
<div>
<Patterns />
</div>
<div>
<Models />
</div>
<div>
<Select
bind:value={$languageStore}
class="bg-primary-800/30 border-none hover:bg-primary-800/40 transition-colors"
>
{#each languages as lang}
<option value={lang.code}>{lang.name}</option>
{/each}
</Select>
</div>
</div>
<div class="w-[50%]">
<Models />
</div>
<div class="w-[50%]">
<Select
bind:value={$languageStore}
class="bg-primary-800/30 border-none hover:bg-primary-800/40 transition-colors"
>
{#each languages as lang}
<option value={lang.code}>{lang.name}</option>
{/each}
</Select>
<!-- Right side - Model Config -->
<div class="w-[65%]">
<ModelConfig />
</div>
</div>

View File

@@ -59,7 +59,7 @@ Take a step back and think step-by-step about how to achieve the best possible r
- You use bulleted lists for output, not numbered lists.
- Do not repeat ideas, quotes, facts, or resources.
- Do not repeat ideas, insights, quotes, habits, facts, or references.
- Do not start items with the same opening words.