new update
This commit is contained in:
+16
-1
@@ -1,6 +1,21 @@
|
||||
--- HIGH PRIORITY
|
||||
--- VERY HIGH PRIORITY:
|
||||
|
||||
Update pfp composer when new upload.actually i have to refresh the page after the save button for seeing it
|
||||
when upload did we have to refresh the pfp preview composer to the new uploaded pictures.
|
||||
|
||||
|
||||
--- MEDIUM PRIORITY
|
||||
Being abble to :
|
||||
Disable features / Enable it:
|
||||
ie : thinking, deep search, etc...
|
||||
|
||||
Downloading models throught a catalog : ollama only
|
||||
|
||||
|
||||
--- LOW PRIORITY
|
||||
|
||||
Search into the old prompts with a search bar.
|
||||
integrate the platform name in the top of the conversations slide list. with a well beautiful font and a flower in lucide svg icon for the brand icon
|
||||
|
||||
Make a beautiful SEO integrate into the html file for disovering.
|
||||
make a robots.txt file for let all llm/crawler/scrapper visiting the site.
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
'';
|
||||
outputHashAlgo = "sha256";
|
||||
outputHashMode = "recursive";
|
||||
outputHash = "sha256-0AhK5sK0FmqxTb1kedUDPH9aOiYKN7z1jWQVFsnb1hs=";
|
||||
outputHash = "sha256-ToEgXq9TpyliuZn+0bu+95SUER+tuXLJ0LHY+c6LUXE=";
|
||||
};
|
||||
|
||||
# Phase 2 (offline): vite build against the pre-fetched node_modules.
|
||||
@@ -40,15 +40,17 @@
|
||||
pname = "kisassistant-frontend";
|
||||
inherit version;
|
||||
src = ./frontend;
|
||||
nativeBuildInputs = [ pkgs.bun ];
|
||||
nativeBuildInputs = [ pkgs.bun pkgs.nodejs ];
|
||||
buildPhase = ''
|
||||
export HOME=$TMPDIR
|
||||
ln -s ${bunDeps} node_modules
|
||||
cp -a ${bunDeps} node_modules
|
||||
chmod -R u+w node_modules
|
||||
patchShebangs node_modules
|
||||
bun run build
|
||||
'';
|
||||
installPhase = ''
|
||||
mkdir -p $out
|
||||
cp -r dist/* $out/
|
||||
cp -r ../public/. $out/
|
||||
'';
|
||||
};
|
||||
in pkgs.stdenv.mkDerivation {
|
||||
|
||||
@@ -58,11 +58,25 @@ export function Sidebar({
|
||||
}) {
|
||||
const [menu, setMenu] = useState<MenuState | null>(null);
|
||||
const touchX = useRef<number | null>(null);
|
||||
// Long-press (mobile right-click): open the context menu, suppress the tap.
|
||||
const pressTimer = useRef<ReturnType<typeof setTimeout> | null>(null);
|
||||
const pressPos = useRef<{ x: number; y: number } | null>(null);
|
||||
const suppressClick = useRef(false);
|
||||
|
||||
function openMenuAt(x: number, y: number, conv: Conversation) {
|
||||
setMenu({ x, y, conv });
|
||||
}
|
||||
|
||||
function openMenu(e: React.MouseEvent, conv: Conversation) {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
setMenu({ x: e.clientX, y: e.clientY, conv });
|
||||
openMenuAt(e.clientX, e.clientY, conv);
|
||||
}
|
||||
|
||||
function cancelPress() {
|
||||
if (pressTimer.current) clearTimeout(pressTimer.current);
|
||||
pressTimer.current = null;
|
||||
pressPos.current = null;
|
||||
}
|
||||
|
||||
if (collapsed && !mobileOpen) return null;
|
||||
@@ -110,9 +124,29 @@ export function Sidebar({
|
||||
key={c.id}
|
||||
role="button"
|
||||
tabIndex={0}
|
||||
onClick={() => onSelect(c.id)}
|
||||
onClick={() => {
|
||||
if (suppressClick.current) {
|
||||
suppressClick.current = false;
|
||||
return;
|
||||
}
|
||||
onSelect(c.id);
|
||||
}}
|
||||
onKeyDown={(e) => e.key === "Enter" && onSelect(c.id)}
|
||||
onContextMenu={(e) => openMenu(e, c)}
|
||||
onTouchStart={(e) => {
|
||||
const t = e.touches[0]!;
|
||||
pressPos.current = { x: t.clientX, y: t.clientY };
|
||||
pressTimer.current = setTimeout(() => {
|
||||
suppressClick.current = true;
|
||||
openMenuAt(t.clientX, t.clientY, c);
|
||||
}, 550);
|
||||
}}
|
||||
onTouchMove={(e) => {
|
||||
const p = pressPos.current;
|
||||
const t = e.touches[0]!;
|
||||
if (p && Math.hypot(t.clientX - p.x, t.clientY - p.y) > 10) cancelPress();
|
||||
}}
|
||||
onTouchEnd={cancelPress}
|
||||
className={cn(
|
||||
"group flex cursor-pointer items-center gap-2 rounded-2xl px-3 py-2.5 text-sm transition",
|
||||
c.id === activeId
|
||||
|
||||
+38
-5
@@ -1,13 +1,23 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
let
|
||||
cfg = config.services.kisassistant;
|
||||
|
||||
# Backward-compatible tri-state: null (default) keeps the legacy behaviour
|
||||
# (setting `domain` activates nginx), true forces it on, false forces it off.
|
||||
nginxEnabled =
|
||||
if cfg.enableNginx != null then cfg.enableNginx
|
||||
else cfg.domain != null;
|
||||
in {
|
||||
options.services.kisassistant = {
|
||||
enable = lib.mkEnableOption "KisAssistant private chat assistant";
|
||||
package = lib.mkOption {
|
||||
type = lib.types.package;
|
||||
default = pkgs.bun;
|
||||
description = "KisAssistant package built from this flake (set via nixpkgs overlay or flake packages output).";
|
||||
type = lib.types.nullOr lib.types.package;
|
||||
default = null;
|
||||
description = ''
|
||||
KisAssistant package built from this flake, e.g.
|
||||
`kisassistant.packages.''${pkgs.system}.default`.
|
||||
Required when the service is enabled.
|
||||
'';
|
||||
};
|
||||
port = lib.mkOption { type = lib.types.port; default = 3000; };
|
||||
host = lib.mkOption { type = lib.types.str; default = "127.0.0.1"; };
|
||||
@@ -22,7 +32,17 @@ in {
|
||||
domain = lib.mkOption {
|
||||
type = lib.types.nullOr lib.types.str;
|
||||
default = null;
|
||||
description = "e.g. chat.kisakay.com — enables bundled nginx reverse proxy.";
|
||||
description = "nginx virtualHost name (e.g. chat.kisakay.com). Required when enableNginx is true.";
|
||||
};
|
||||
enableNginx = lib.mkOption {
|
||||
type = lib.types.nullOr lib.types.bool;
|
||||
default = null;
|
||||
description = ''
|
||||
Reverse-proxy the service through nginx with TLS + ACME.
|
||||
- `true`: nginx is configured (requires `domain`).
|
||||
- `false`: nginx is never configured, even if `domain` is set.
|
||||
- `null` (default): legacy behaviour — nginx is configured iff `domain` is set.
|
||||
'';
|
||||
};
|
||||
extraEnv = lib.mkOption {
|
||||
type = lib.types.attrsOf lib.types.str;
|
||||
@@ -32,6 +52,17 @@ in {
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
assertions = [
|
||||
{
|
||||
assertion = cfg.package != null;
|
||||
message = "services.kisassistant.package must be set, e.g. kisassistant.packages.\${pkgs.system}.default";
|
||||
}
|
||||
{
|
||||
assertion = !(nginxEnabled && cfg.domain == null);
|
||||
message = "services.kisassistant.enableNginx requires services.kisassistant.domain to be set";
|
||||
}
|
||||
];
|
||||
|
||||
users.users.${cfg.user} = {
|
||||
isSystemUser = true;
|
||||
group = cfg.user;
|
||||
@@ -47,8 +78,10 @@ in {
|
||||
environment = {
|
||||
PORT = toString cfg.port;
|
||||
HOST = cfg.host;
|
||||
NODE_ENV = "production";
|
||||
DATA_DIR = "${cfg.dataDir}/data";
|
||||
CDN_DIR = "${cfg.dataDir}/cdn";
|
||||
DRIVER_DEBUG = "false";
|
||||
OLLAMA_HOST = cfg.ollamaHost;
|
||||
} // cfg.extraEnv;
|
||||
serviceConfig = {
|
||||
@@ -68,7 +101,7 @@ in {
|
||||
'';
|
||||
};
|
||||
|
||||
services.nginx = lib.mkIf (cfg.domain != null) {
|
||||
services.nginx = lib.mkIf nginxEnabled {
|
||||
enable = true;
|
||||
recommendedProxySettings = true;
|
||||
virtualHosts.${cfg.domain} = {
|
||||
|
||||
Reference in New Issue
Block a user