Compare commits
No commits in common. "5b1276251184e4d6695b06ccf66258b1b3a2871b" and "bebdd35c6e5d5cbc9de44a260a82112b3cbb524b" have entirely different histories.
5b12762511
...
bebdd35c6e
18 changed files with 90 additions and 147 deletions
|
@ -1,13 +0,0 @@
|
|||
#!/usr/bin/env fish
|
||||
|
||||
set DIRECTORY_TO_WATCH "./"
|
||||
set SCRIPT_TO_RUN "leptosfmt ./ && rustywind --write ./"
|
||||
|
||||
while true
|
||||
# Wait for any change in the directory
|
||||
inotifywait -e modify,create,delete,move $DIRECTORY_TO_WATCH
|
||||
|
||||
# Run your script
|
||||
bash -c "$SCRIPT_TO_RUN"
|
||||
sleep 5
|
||||
end
|
|
@ -1,96 +0,0 @@
|
|||
[config]
|
||||
load_cargo_aliases = false
|
||||
|
||||
[env]
|
||||
CARGO_MAKE_EXTEND_WORKSPACE_MAKEFILE = true
|
||||
# leptos repos
|
||||
LEPTOS_REPOS = "llama_forge_rs"
|
||||
#
|
||||
# DB_REPOS
|
||||
|
||||
[tasks.default]
|
||||
alias = "all"
|
||||
|
||||
[tasks.test123]
|
||||
script = "echo test123-${CARGO_MAKE_CRATE_CURRENT_WORKSPACE_MEMBER}"
|
||||
|
||||
[tasks.refresh-all]
|
||||
description = "clean the repo and rebuild everything"
|
||||
dependencies = ["clean", "all", "lall"]
|
||||
|
||||
[tasks.mksitedir]
|
||||
workspace = false
|
||||
script = "mkdir -p ./target/site"
|
||||
|
||||
[tasks.all]
|
||||
description = "rebuild everything"
|
||||
dependencies = ["mksitedir", "docset", "check", "clippy", "build", "build-release", "format", "lformat", "lbuild", "lbuild-release"]
|
||||
|
||||
[tasks.lformat]
|
||||
scripts = "leptosfmt . && rustywind . --write"
|
||||
|
||||
[tasks.lbuild]
|
||||
category = "Build"
|
||||
script = '''
|
||||
#!/usr/bin/env fish
|
||||
set current "$CARGO_MAKE_CRATE_CURRENT_WORKSPACE_MEMBER"
|
||||
if contains "$LEPTOS_REPOS" $current
|
||||
cargo leptos build
|
||||
else
|
||||
$current is not a leptos repo!
|
||||
end
|
||||
'''
|
||||
|
||||
[tasks.lbuild-release]
|
||||
category = "Build"
|
||||
command = "cargo"
|
||||
args = ["leptos", "build", "--release"]
|
||||
|
||||
[tasks.lserve]
|
||||
command = "cargo"
|
||||
args = ["leptos", "serve"]
|
||||
|
||||
[tasks.lwatch]
|
||||
command = "cargo"
|
||||
args = ["leptos", "watch", "--hot-reload"]
|
||||
|
||||
[tasks.docset]
|
||||
workspace = false
|
||||
dependencies = ["make-docset", "cp-docset"]
|
||||
|
||||
[tasks.make-docset]
|
||||
workspace = false
|
||||
script = "cargo docset --workspace --platform-family redvault-ai "
|
||||
|
||||
[tasks.cp-docset]
|
||||
workspace = false
|
||||
script = "cp -r target/docset/redvault-ai.docset ~/.local/share/Zeal/Zeal/docsets/"
|
||||
|
||||
[tasks.watch-test]
|
||||
command = "cargo"
|
||||
args = [
|
||||
"watch",
|
||||
"--",
|
||||
"cargo",
|
||||
"ltest",
|
||||
"--target-dir",
|
||||
"target/test",
|
||||
"--all-features",
|
||||
]
|
||||
|
||||
[tasks.watch-check]
|
||||
command = "cargo"
|
||||
args = ["watch", "--", "cargo", "lcheck", "--all-features"]
|
||||
|
||||
[tasks.lwatch-fmt]
|
||||
command = "fish"
|
||||
args = ["./.dist/watch.fish"]
|
||||
|
||||
[tasks.reset-db]
|
||||
# env = { "CARGO_MAKE_WORKSPACE_SKIP_MEMBERS" = ["vewa_xls_export"] }
|
||||
script = '''
|
||||
DB_FILE=${CARGO_MAKE_CRATE_CURRENT_WORKSPACE_MEMBER}.sqlite3
|
||||
rm ../$DB_FILE \
|
||||
&& touch ../$DB_FILE \
|
||||
&& cargo sqlx migrate run --database-url="sqlite:../$DB_FILE"
|
||||
'''
|
15
llama_forge_rs/.dist/watch.fish
Executable file
15
llama_forge_rs/.dist/watch.fish
Executable file
|
@ -0,0 +1,15 @@
|
|||
#!/usr/bin/env fish
|
||||
|
||||
echo "watchPWD: $(pwd)"
|
||||
|
||||
set DIRECTORY_TO_WATCH "./src"
|
||||
set SCRIPT_TO_RUN "echo a && leptosfmt $(pwd) && rustywind --write ./src && echo b"
|
||||
|
||||
while true
|
||||
# Wait for any change in the directory
|
||||
inotifywait -r -e modify,create,delete,move $DIRECTORY_TO_WATCH
|
||||
|
||||
# Run your script
|
||||
bash -c "$SCRIPT_TO_RUN"
|
||||
sleep 5
|
||||
end
|
|
@ -9,9 +9,6 @@ jobs:
|
|||
- run: echo "🎉 The job was automatically triggered by a ${{ gitea.event_name }} event."
|
||||
- run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by Forgejo!"
|
||||
- run: echo "🔎 The name of your branch is ${{ gitea.ref }} and your repository is ${{ gitea.repository }}."
|
||||
- run: echo PATH: $PATH
|
||||
- run: ls $PATH
|
||||
- run: echo =====================================================
|
||||
- name: Check out repository code
|
||||
uses: actions/checkout@1d96c772d19495a3b5c517cd2bc0cb401ea0529f # v4
|
||||
- run: echo "💡 The ${{ gitea.repository }} repository has been cloned to the runner."
|
34
llama_forge_rs/.nix/cargo-leptos.nix
Normal file
34
llama_forge_rs/.nix/cargo-leptos.nix
Normal file
|
@ -0,0 +1,34 @@
|
|||
{
|
||||
fetchFromGitHub,
|
||||
lib,
|
||||
pkg-config,
|
||||
rustPlatform,
|
||||
stdenv,
|
||||
}: let
|
||||
inherit (lib) optionals;
|
||||
in
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "cargo-leptos";
|
||||
version = "0.2.16";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "leptos-rs";
|
||||
repo = pname;
|
||||
rev = "v0.2.16";
|
||||
hash = "sha256-yDBVo3GarKvcuMX7mxdxx0SJSJ5VOX3bUx6XmYxLfq4=";
|
||||
};
|
||||
|
||||
cargoHash = "sha256-DZbZ3SHGWvje0gEqlx2mdLvCR4U3Xzkp8gS9FIbxW6g=";
|
||||
|
||||
# https://github.com/leptos-rs/cargo-leptos#dependencies
|
||||
buildFeatures = ["no_downloads"]; # cargo-leptos will try to install missing dependencies on its own otherwise
|
||||
doCheck = false; # Check phase tries to query crates.io
|
||||
|
||||
meta = with lib; {
|
||||
description = "A build tool for the Leptos web framework";
|
||||
homepage = "https://github.com/leptos-rs/cargo-leptos";
|
||||
changelog = "https://github.com/leptos-rs/cargo-leptos/releases/tag/${version}";
|
||||
license = with licenses; [mit];
|
||||
maintainers = with maintainers; [benwis];
|
||||
};
|
||||
}
|
|
@ -49,9 +49,14 @@ fn ChatMessageBubble(
|
|||
|
||||
let inner_p = move || {
|
||||
if edit_mode.get() {
|
||||
view! { <p inner_html=move || { msg_str() }></p> }
|
||||
view! {
|
||||
|
||||
<p inner_html=move || { msg_str() }></p>
|
||||
}
|
||||
} else {
|
||||
view! { <p inner_html=move || { md_str() }></p> }
|
||||
view! {
|
||||
<p inner_html=move || { md_str() }></p>
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
system_resources:
|
||||
hardware:
|
||||
ram: 48G
|
||||
vram: 30G
|
||||
model_specs:
|
||||
models:
|
||||
- name: "tabby-code"
|
||||
port: 18080
|
||||
# internal_port: 28080 # Optional
|
||||
|
|
|
@ -22,7 +22,7 @@ impl AppConfig {
|
|||
if model.internal_port.is_none() {
|
||||
model.internal_port = Some(
|
||||
openport::pick_random_unused_port()
|
||||
.unwrap_or_else(|| panic!("No open port found for {:?}", model)),
|
||||
.expect(&format!("No open port found for {:?}", model)),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
use anyhow::Error as AnyError;
|
||||
use axum::{http, response::IntoResponse};
|
||||
use hyper;
|
||||
use reqwest;
|
||||
use reqwest_middleware;
|
||||
use std::io;
|
||||
use thiserror::Error;
|
||||
use anyhow::Error as AnyError;
|
||||
|
||||
#[derive(Error, Debug)]
|
||||
pub enum AppError {
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
use llama_proxy_man::{config::AppConfig, logging, start_server};
|
||||
use tokio;
|
||||
|
||||
#[tokio::main]
|
||||
async fn main() {
|
||||
|
|
|
@ -3,7 +3,7 @@ pub fn parse_size(size_str: &str) -> Option<u64> {
|
|||
let mut unit = String::new();
|
||||
|
||||
for c in size_str.chars() {
|
||||
if c.is_ascii_digit() || c == '.' {
|
||||
if c.is_digit(10) || c == '.' {
|
||||
num.push(c);
|
||||
} else {
|
||||
unit.push(c);
|
||||
|
|
Loading…
Add table
Reference in a new issue