From 9f85c0bd2309da391dee62caffd1f83e0ab00adc Mon Sep 17 00:00:00 2001 From: Meng Zhang Date: Sun, 29 Oct 2023 21:43:53 -0700 Subject: [PATCH] Revert "feat: make --model optional (#668)" This reverts commit c55e4481baa8b1af2e5a15cbe6bf710dcc05fd23. --- CHANGELOG.md | 1 - crates/tabby/src/serve/health.rs | 2 +- crates/tabby/src/serve/mod.rs | 49 ++++++------------- crates/tabby/ui/404.html | 2 +- .../_buildManifest.js | 0 .../_ssgManifest.js | 0 ...65fe0055a9.js => page-478c8032840b58db.js} | 2 +- crates/tabby/ui/api.html | 2 +- crates/tabby/ui/api.txt | 2 +- crates/tabby/ui/index.html | 2 +- crates/tabby/ui/index.txt | 4 +- crates/tabby/ui/playground.html | 2 +- crates/tabby/ui/playground.txt | 4 +- ee/tabby-ui/app/page.tsx | 12 ++--- ee/tabby-ui/lib/hooks/use-health.tsx | 2 +- 15 files changed, 32 insertions(+), 54 deletions(-) rename crates/tabby/ui/_next/static/{OqK3ih1CowLA0x8lARuCQ => QrHYrv6IM9fXxh7mpanWB}/_buildManifest.js (100%) rename crates/tabby/ui/_next/static/{OqK3ih1CowLA0x8lARuCQ => QrHYrv6IM9fXxh7mpanWB}/_ssgManifest.js (100%) rename crates/tabby/ui/_next/static/chunks/app/{page-11121665fe0055a9.js => page-478c8032840b58db.js} (74%) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5a74aaa2220a..49c64f17d75c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,7 +10,6 @@ * Switch cpu backend to llama.cpp: https://github.com/TabbyML/tabby/pull/638 * add `server.completion_timeout` to control the code completion interface timeout: https://github.com/TabbyML/tabby/pull/637 * Switch cuda backend to llama.cpp: https://github.com/TabbyML/tabby/pull/656 -* Make `--model` optional, so users can create a chat only instance. # v0.4.0 diff --git a/crates/tabby/src/serve/health.rs b/crates/tabby/src/serve/health.rs index 02ba2dea1e59..0a5e0bfc25e0 100644 --- a/crates/tabby/src/serve/health.rs +++ b/crates/tabby/src/serve/health.rs @@ -9,7 +9,7 @@ use utoipa::ToSchema; #[derive(Serialize, Deserialize, ToSchema, Clone, Debug)] pub struct HealthState { - model: Option, + model: String, #[serde(skip_serializing_if = "Option::is_none")] chat_model: Option, device: String, diff --git a/crates/tabby/src/serve/mod.rs b/crates/tabby/src/serve/mod.rs index 865902ed31c7..cde2a98c0242 100644 --- a/crates/tabby/src/serve/mod.rs +++ b/crates/tabby/src/serve/mod.rs @@ -106,7 +106,7 @@ impl Device { pub struct ServeArgs { /// Model id for `/completions` API endpoint. #[clap(long)] - model: Option, + model: String, /// Model id for `/chat/completions` API endpoints. #[clap(long)] @@ -129,9 +129,7 @@ pub async fn main(config: &Config, args: &ServeArgs) { valid_args(args); if args.device != Device::ExperimentalHttp { - if let Some(model) = &args.model { - download_model(model).await; - } + download_model(&args.model).await; if let Some(chat_model) = &args.chat_model { download_model(chat_model).await; } @@ -173,22 +171,20 @@ pub async fn main(config: &Config, args: &ServeArgs) { fn api_router(args: &ServeArgs, config: &Config) -> Router { let index_server = Arc::new(IndexServer::new()); - let completion_state = if let Some(model) = &args.model { + let completion_state = { let ( engine, EngineInfo { prompt_template, .. }, - ) = create_engine(model, args); + ) = create_engine(&args.model, args); let engine = Arc::new(engine); let state = completions::CompletionState::new( engine.clone(), index_server.clone(), prompt_template, ); - Some(Arc::new(state)) - } else { - None + Arc::new(state) }; let chat_state = if let Some(chat_model) = &args.chat_model { @@ -219,18 +215,16 @@ fn api_router(args: &ServeArgs, config: &Config) -> Router { ) }); - if let Some(completion_state) = completion_state { - routers.push({ - Router::new() - .route( - "/v1/completions", - routing::post(completions::completions).with_state(completion_state), - ) - .layer(TimeoutLayer::new(Duration::from_secs( - config.server.completion_timeout, - ))) - }); - } + routers.push({ + Router::new() + .route( + "/v1/completions", + routing::post(completions::completions).with_state(completion_state), + ) + .layer(TimeoutLayer::new(Duration::from_secs( + config.server.completion_timeout, + ))) + }); if let Some(chat_state) = chat_state { routers.push({ @@ -285,19 +279,6 @@ trait OpenApiOverride { impl OpenApiOverride for utoipa::openapi::OpenApi { fn override_doc(&mut self, args: &ServeArgs) { - if args.model.is_none() { - self.paths.paths.remove("/v1/completions"); - if let Some(components) = self.components.as_mut() { - components.schemas.remove("CompletionRequest"); - components.schemas.remove("CompletionResponse"); - components.schemas.remove("Choice"); - components.schemas.remove("DebugData"); - components.schemas.remove("DebugOptions"); - components.schemas.remove("Segments"); - components.schemas.remove("Snippet"); - } - } - if args.chat_model.is_none() { self.paths.paths.remove("/v1beta/chat/completions"); diff --git a/crates/tabby/ui/404.html b/crates/tabby/ui/404.html index 88c7a1c3169f..3e92032b3d46 100644 --- a/crates/tabby/ui/404.html +++ b/crates/tabby/ui/404.html @@ -1 +1 @@ -404: This page could not be found.Tabby - Home

404

This page could not be found.

\ No newline at end of file +404: This page could not be found.Tabby - Home

404

This page could not be found.

\ No newline at end of file diff --git a/crates/tabby/ui/_next/static/OqK3ih1CowLA0x8lARuCQ/_buildManifest.js b/crates/tabby/ui/_next/static/QrHYrv6IM9fXxh7mpanWB/_buildManifest.js similarity index 100% rename from crates/tabby/ui/_next/static/OqK3ih1CowLA0x8lARuCQ/_buildManifest.js rename to crates/tabby/ui/_next/static/QrHYrv6IM9fXxh7mpanWB/_buildManifest.js diff --git a/crates/tabby/ui/_next/static/OqK3ih1CowLA0x8lARuCQ/_ssgManifest.js b/crates/tabby/ui/_next/static/QrHYrv6IM9fXxh7mpanWB/_ssgManifest.js similarity index 100% rename from crates/tabby/ui/_next/static/OqK3ih1CowLA0x8lARuCQ/_ssgManifest.js rename to crates/tabby/ui/_next/static/QrHYrv6IM9fXxh7mpanWB/_ssgManifest.js diff --git a/crates/tabby/ui/_next/static/chunks/app/page-11121665fe0055a9.js b/crates/tabby/ui/_next/static/chunks/app/page-478c8032840b58db.js similarity index 74% rename from crates/tabby/ui/_next/static/chunks/app/page-11121665fe0055a9.js rename to crates/tabby/ui/_next/static/chunks/app/page-478c8032840b58db.js index 07b752c20163..c8eed7a86455 100644 --- a/crates/tabby/ui/_next/static/chunks/app/page-11121665fe0055a9.js +++ b/crates/tabby/ui/_next/static/chunks/app/page-478c8032840b58db.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[931],{97851:function(e,t,s){Promise.resolve().then(s.bind(s,25454))},25454:function(e,t,s){"use strict";s.r(t),s.d(t,{default:function(){return y}});var a=s(57437),n=s(93023),r=s(2265),i=s(27775),l=s(39311),o=s(84168);let c=i.fC;i.xz;let d=e=>{let{className:t,children:s,...n}=e;return(0,a.jsx)(i.h_,{className:(0,l.cn)(t),...n,children:(0,a.jsx)("div",{className:"fixed inset-0 z-50 flex items-start justify-center sm:items-center",children:s})})};d.displayName=i.h_.displayName;let m=r.forwardRef((e,t)=>{let{className:s,...n}=e;return(0,a.jsx)(i.aV,{ref:t,className:(0,l.cn)("fixed inset-0 z-50 bg-background/80 backdrop-blur-sm transition-all duration-100 data-[state=closed]:animate-out data-[state=closed]:fade-out data-[state=open]:fade-in",s),...n})});m.displayName=i.aV.displayName;let u=r.forwardRef((e,t)=>{let{className:s,children:n,...r}=e;return(0,a.jsxs)(d,{children:[(0,a.jsx)(m,{}),(0,a.jsxs)(i.VY,{ref:t,className:(0,l.cn)("fixed z-50 grid w-full gap-4 rounded-b-lg border bg-background p-6 shadow-sm animate-in data-[state=open]:fade-in-90 data-[state=open]:slide-in-from-bottom-10 sm:max-w-lg sm:rounded-lg sm:zoom-in-90 data-[state=open]:sm:slide-in-from-bottom-0",s),...r,children:[n,(0,a.jsxs)(i.x8,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[(0,a.jsx)(o.bM,{}),(0,a.jsx)("span",{className:"sr-only",children:"Close"})]})]})]})});u.displayName=i.VY.displayName;let f=e=>{let{className:t,...s}=e;return(0,a.jsx)("div",{className:(0,l.cn)("flex flex-col space-y-1.5 text-center sm:text-left",t),...s})};f.displayName="DialogHeader";let h=e=>{let{className:t,...s}=e;return(0,a.jsx)("div",{className:(0,l.cn)("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",t),...s})};h.displayName="DialogFooter";let x=r.forwardRef((e,t)=>{let{className:s,...n}=e;return(0,a.jsx)(i.Dx,{ref:t,className:(0,l.cn)("text-lg font-semibold leading-none tracking-tight",s),...n})});x.displayName=i.Dx.displayName;let g=r.forwardRef((e,t)=>{let{className:s,...n}=e;return(0,a.jsx)(i.dk,{ref:t,className:(0,l.cn)("text-sm text-muted-foreground",s),...n})});g.displayName=i.dk.displayName;var b=s(16775),p=s(94190);let j="community-dialog-shown";function y(){let[e,t]=(0,r.useState)(!1);return(0,r.useEffect)(()=>{localStorage.getItem(j)||(t(!0),localStorage.setItem(j,"true"))},[]),(0,a.jsxs)("div",{className:"flex grow items-center justify-center",children:[(0,a.jsx)(w,{}),(0,a.jsx)(c,{open:e,onOpenChange:t,children:(0,a.jsxs)(u,{children:[(0,a.jsxs)(f,{className:"gap-3",children:[(0,a.jsx)(x,{children:"Join the Tabby community"}),(0,a.jsx)(g,{children:"Connect with other contributors building Tabby. Share knowledge, get help, and contribute to the open-source project."})]}),(0,a.jsx)(h,{className:"sm:justify-start",children:(0,a.jsxs)("a",{target:"_blank",href:"https://join.slack.com/t/tabbycommunity/shared_invite/zt-1xeiddizp-bciR2RtFTaJ37RBxr8VxpA",className:(0,n.d)(),children:[(0,a.jsx)(o.gx,{className:"-ml-2 h-8 w-8"}),"Join us on Slack"]})})]})})]})}function N(e){let{href:t,children:s}=e;return(0,a.jsx)("a",{target:"_blank",href:t,className:"underline",children:s})}function v(e){return encodeURIComponent(e.replaceAll("-","--"))}function w(){let{data:e}=(0,p.Q)();if(e)return(0,a.jsxs)("div",{className:"flex w-2/3 flex-col gap-3 lg:w-1/3",children:[(0,a.jsxs)("h1",{children:[(0,a.jsx)("span",{className:"font-bold",children:"Congratulations"}),", your tabby instance is running!"]}),(0,a.jsxs)("span",{className:"flex flex-wrap gap-1",children:[(0,a.jsx)("a",{target:"_blank",href:"https://github.com/TabbyML/tabby/releases/tag/".concat(e.version.git_describe),children:(0,a.jsx)("img",{src:"https://img.shields.io/badge/version-".concat(v(e.version.git_describe),"-green")})}),(0,a.jsx)("img",{src:"https://img.shields.io/badge/device-".concat(e.device,"-blue")}),e.model&&(0,a.jsx)("img",{src:"https://img.shields.io/badge/model-".concat(v(e.model),"-red")}),e.chat_model&&(0,a.jsx)("img",{src:"https://img.shields.io/badge/chat%20model-".concat(v(e.chat_model),"-orange")})]}),(0,a.jsx)(b.Z,{}),(0,a.jsxs)("span",{children:["You can find our documentation"," ",(0,a.jsx)(N,{href:"https://tabby.tabbyml.com/docs/getting-started",children:"here"}),".",(0,a.jsxs)("ul",{className:"mt-2",children:[(0,a.jsxs)("li",{children:["\uD83D\uDCBB"," ",(0,a.jsx)(N,{href:"https://tabby.tabbyml.com/docs/extensions/",children:"IDE/Editor Extensions"})]}),(0,a.jsxs)("li",{children:["⚙️"," ",(0,a.jsx)(N,{href:"https://tabby.tabbyml.com/docs/configuration",children:"Configuration"})]})]})]})]})}},16775:function(e,t,s){"use strict";s.d(t,{Z:function(){return l}});var a=s(57437),n=s(2265),r=s(26823),i=s(39311);let l=n.forwardRef((e,t)=>{let{className:s,orientation:n="horizontal",decorative:l=!0,...o}=e;return(0,a.jsx)(r.f,{ref:t,decorative:l,orientation:n,className:(0,i.cn)("shrink-0 bg-border","horizontal"===n?"h-[1px] w-full":"h-full w-[1px]",s),...o})});l.displayName=r.f.displayName},94190:function(e,t,s){"use strict";s.d(t,{Q:function(){return r}});var a=s(45362);function n(e){return fetch(e).then(e=>e.json())}function r(){return(0,a.Z)("/v1/health",n)}}},function(e){e.O(0,[400,362,703,894,971,864,744],function(){return e(e.s=97851)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[931],{97851:function(e,t,s){Promise.resolve().then(s.bind(s,25454))},25454:function(e,t,s){"use strict";s.r(t),s.d(t,{default:function(){return y}});var a=s(57437),n=s(93023),r=s(2265),i=s(27775),l=s(39311),o=s(84168);let c=i.fC;i.xz;let d=e=>{let{className:t,children:s,...n}=e;return(0,a.jsx)(i.h_,{className:(0,l.cn)(t),...n,children:(0,a.jsx)("div",{className:"fixed inset-0 z-50 flex items-start justify-center sm:items-center",children:s})})};d.displayName=i.h_.displayName;let m=r.forwardRef((e,t)=>{let{className:s,...n}=e;return(0,a.jsx)(i.aV,{ref:t,className:(0,l.cn)("fixed inset-0 z-50 bg-background/80 backdrop-blur-sm transition-all duration-100 data-[state=closed]:animate-out data-[state=closed]:fade-out data-[state=open]:fade-in",s),...n})});m.displayName=i.aV.displayName;let u=r.forwardRef((e,t)=>{let{className:s,children:n,...r}=e;return(0,a.jsxs)(d,{children:[(0,a.jsx)(m,{}),(0,a.jsxs)(i.VY,{ref:t,className:(0,l.cn)("fixed z-50 grid w-full gap-4 rounded-b-lg border bg-background p-6 shadow-sm animate-in data-[state=open]:fade-in-90 data-[state=open]:slide-in-from-bottom-10 sm:max-w-lg sm:rounded-lg sm:zoom-in-90 data-[state=open]:sm:slide-in-from-bottom-0",s),...r,children:[n,(0,a.jsxs)(i.x8,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[(0,a.jsx)(o.bM,{}),(0,a.jsx)("span",{className:"sr-only",children:"Close"})]})]})]})});u.displayName=i.VY.displayName;let f=e=>{let{className:t,...s}=e;return(0,a.jsx)("div",{className:(0,l.cn)("flex flex-col space-y-1.5 text-center sm:text-left",t),...s})};f.displayName="DialogHeader";let h=e=>{let{className:t,...s}=e;return(0,a.jsx)("div",{className:(0,l.cn)("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",t),...s})};h.displayName="DialogFooter";let x=r.forwardRef((e,t)=>{let{className:s,...n}=e;return(0,a.jsx)(i.Dx,{ref:t,className:(0,l.cn)("text-lg font-semibold leading-none tracking-tight",s),...n})});x.displayName=i.Dx.displayName;let g=r.forwardRef((e,t)=>{let{className:s,...n}=e;return(0,a.jsx)(i.dk,{ref:t,className:(0,l.cn)("text-sm text-muted-foreground",s),...n})});g.displayName=i.dk.displayName;var b=s(16775),p=s(94190);let j="community-dialog-shown";function y(){let[e,t]=(0,r.useState)(!1);return(0,r.useEffect)(()=>{localStorage.getItem(j)||(t(!0),localStorage.setItem(j,"true"))},[]),(0,a.jsxs)("div",{className:"flex grow items-center justify-center",children:[(0,a.jsx)(w,{}),(0,a.jsx)(c,{open:e,onOpenChange:t,children:(0,a.jsxs)(u,{children:[(0,a.jsxs)(f,{className:"gap-3",children:[(0,a.jsx)(x,{children:"Join the Tabby community"}),(0,a.jsx)(g,{children:"Connect with other contributors building Tabby. Share knowledge, get help, and contribute to the open-source project."})]}),(0,a.jsx)(h,{className:"sm:justify-start",children:(0,a.jsxs)("a",{target:"_blank",href:"https://join.slack.com/t/tabbycommunity/shared_invite/zt-1xeiddizp-bciR2RtFTaJ37RBxr8VxpA",className:(0,n.d)(),children:[(0,a.jsx)(o.gx,{className:"-ml-2 h-8 w-8"}),"Join us on Slack"]})})]})})]})}function N(e){let{href:t,children:s}=e;return(0,a.jsx)("a",{target:"_blank",href:t,className:"underline",children:s})}function v(e){return encodeURIComponent(e.replaceAll("-","--"))}function w(){let{data:e}=(0,p.Q)();if(e)return(0,a.jsxs)("div",{className:"flex w-2/3 flex-col gap-3 lg:w-1/3",children:[(0,a.jsxs)("h1",{children:[(0,a.jsx)("span",{className:"font-bold",children:"Congratulations"}),", your tabby instance is running!"]}),(0,a.jsxs)("span",{className:"flex flex-wrap gap-1",children:[(0,a.jsx)("a",{target:"_blank",href:"https://github.com/TabbyML/tabby/releases/tag/".concat(e.version.git_describe),children:(0,a.jsx)("img",{src:"https://img.shields.io/badge/version-".concat(v(e.version.git_describe),"-green")})}),(0,a.jsx)("img",{src:"https://img.shields.io/badge/device-".concat(e.device,"-blue")}),(0,a.jsx)("img",{src:"https://img.shields.io/badge/model-".concat(v(e.model),"-red")}),e.chat_model&&(0,a.jsx)("img",{src:"https://img.shields.io/badge/chat%20model-".concat(v(e.chat_model),"-orange")})]}),(0,a.jsx)(b.Z,{}),(0,a.jsxs)("span",{children:["You can find our documentation"," ",(0,a.jsx)(N,{href:"https://tabby.tabbyml.com/docs/getting-started",children:"here"}),".",(0,a.jsxs)("ul",{className:"mt-2",children:[(0,a.jsxs)("li",{children:["\uD83D\uDCBB"," ",(0,a.jsx)(N,{href:"https://tabby.tabbyml.com/docs/extensions/",children:"IDE/Editor Extensions"})]}),(0,a.jsxs)("li",{children:["⚙️"," ",(0,a.jsx)(N,{href:"https://tabby.tabbyml.com/docs/configuration",children:"Configuration"})]})]})]})]})}},16775:function(e,t,s){"use strict";s.d(t,{Z:function(){return l}});var a=s(57437),n=s(2265),r=s(26823),i=s(39311);let l=n.forwardRef((e,t)=>{let{className:s,orientation:n="horizontal",decorative:l=!0,...o}=e;return(0,a.jsx)(r.f,{ref:t,decorative:l,orientation:n,className:(0,i.cn)("shrink-0 bg-border","horizontal"===n?"h-[1px] w-full":"h-full w-[1px]",s),...o})});l.displayName=r.f.displayName},94190:function(e,t,s){"use strict";s.d(t,{Q:function(){return r}});var a=s(45362);function n(e){return fetch(e).then(e=>e.json())}function r(){return(0,a.Z)("/v1/health",n)}}},function(e){e.O(0,[400,362,703,894,971,864,744],function(){return e(e.s=97851)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/crates/tabby/ui/api.html b/crates/tabby/ui/api.html index 33311de3ed55..27a944b07602 100644 --- a/crates/tabby/ui/api.html +++ b/crates/tabby/ui/api.html @@ -1 +1 @@ -Tabby - API
\ No newline at end of file +Tabby - API
\ No newline at end of file diff --git a/crates/tabby/ui/api.txt b/crates/tabby/ui/api.txt index f1b8ade3aaf2..6a9d2d1f080c 100644 --- a/crates/tabby/ui/api.txt +++ b/crates/tabby/ui/api.txt @@ -1,7 +1,7 @@ 1:HL["/_next/static/media/86fdec36ddd9097e-s.p.woff2","font",{"crossOrigin":"","type":"font/woff2"}] 2:HL["/_next/static/media/c9a5bc6a7c948fb0-s.p.woff2","font",{"crossOrigin":"","type":"font/woff2"}] 3:HL["/_next/static/css/2b051a9b83c80bf9.css","style"] -0:["OqK3ih1CowLA0x8lARuCQ",[[["",{"children":["api",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",true],"$L4",[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/2b051a9b83c80bf9.css","precedence":"next"}]],"$L5"]]]] +0:["QrHYrv6IM9fXxh7mpanWB",[[["",{"children":["api",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",true],"$L4",[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/2b051a9b83c80bf9.css","precedence":"next"}]],"$L5"]]]] 6:I{"id":5925,"chunks":["400:static/chunks/400-bab9e88e0219f9f5.js","406:static/chunks/406-35481e1b86c5b377.js","362:static/chunks/362-ae0994d279f3f3bb.js","563:static/chunks/563-52218f82bb9eb225.js","894:static/chunks/894-f0d1adefd8c6331e.js","185:static/chunks/app/layout-f087fba7a4279e51.js"],"name":"Toaster","async":false} 7:I{"id":78495,"chunks":["400:static/chunks/400-bab9e88e0219f9f5.js","406:static/chunks/406-35481e1b86c5b377.js","362:static/chunks/362-ae0994d279f3f3bb.js","563:static/chunks/563-52218f82bb9eb225.js","894:static/chunks/894-f0d1adefd8c6331e.js","185:static/chunks/app/layout-f087fba7a4279e51.js"],"name":"Providers","async":false} 8:I{"id":79446,"chunks":["400:static/chunks/400-bab9e88e0219f9f5.js","406:static/chunks/406-35481e1b86c5b377.js","362:static/chunks/362-ae0994d279f3f3bb.js","563:static/chunks/563-52218f82bb9eb225.js","894:static/chunks/894-f0d1adefd8c6331e.js","185:static/chunks/app/layout-f087fba7a4279e51.js"],"name":"Header","async":false} diff --git a/crates/tabby/ui/index.html b/crates/tabby/ui/index.html index 28b49fe0dd29..4411225edd1f 100644 --- a/crates/tabby/ui/index.html +++ b/crates/tabby/ui/index.html @@ -1 +1 @@ -Tabby - Home
\ No newline at end of file +Tabby - Home
\ No newline at end of file diff --git a/crates/tabby/ui/index.txt b/crates/tabby/ui/index.txt index 7f16e50fb32b..9ba00c8bb3e7 100644 --- a/crates/tabby/ui/index.txt +++ b/crates/tabby/ui/index.txt @@ -1,14 +1,14 @@ 1:HL["/_next/static/media/86fdec36ddd9097e-s.p.woff2","font",{"crossOrigin":"","type":"font/woff2"}] 2:HL["/_next/static/media/c9a5bc6a7c948fb0-s.p.woff2","font",{"crossOrigin":"","type":"font/woff2"}] 3:HL["/_next/static/css/2b051a9b83c80bf9.css","style"] -0:["OqK3ih1CowLA0x8lARuCQ",[[["",{"children":["__PAGE__",{}]},"$undefined","$undefined",true],"$L4",[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/2b051a9b83c80bf9.css","precedence":"next"}]],"$L5"]]]] +0:["QrHYrv6IM9fXxh7mpanWB",[[["",{"children":["__PAGE__",{}]},"$undefined","$undefined",true],"$L4",[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/2b051a9b83c80bf9.css","precedence":"next"}]],"$L5"]]]] 6:I{"id":5925,"chunks":["400:static/chunks/400-bab9e88e0219f9f5.js","406:static/chunks/406-35481e1b86c5b377.js","362:static/chunks/362-ae0994d279f3f3bb.js","563:static/chunks/563-52218f82bb9eb225.js","894:static/chunks/894-f0d1adefd8c6331e.js","185:static/chunks/app/layout-f087fba7a4279e51.js"],"name":"Toaster","async":false} 7:I{"id":78495,"chunks":["400:static/chunks/400-bab9e88e0219f9f5.js","406:static/chunks/406-35481e1b86c5b377.js","362:static/chunks/362-ae0994d279f3f3bb.js","563:static/chunks/563-52218f82bb9eb225.js","894:static/chunks/894-f0d1adefd8c6331e.js","185:static/chunks/app/layout-f087fba7a4279e51.js"],"name":"Providers","async":false} 8:I{"id":79446,"chunks":["400:static/chunks/400-bab9e88e0219f9f5.js","406:static/chunks/406-35481e1b86c5b377.js","362:static/chunks/362-ae0994d279f3f3bb.js","563:static/chunks/563-52218f82bb9eb225.js","894:static/chunks/894-f0d1adefd8c6331e.js","185:static/chunks/app/layout-f087fba7a4279e51.js"],"name":"Header","async":false} 9:I{"id":81443,"chunks":["272:static/chunks/webpack-04ed420267a761a9.js","971:static/chunks/fd9d1056-5dfc77aa37d8c76f.js","864:static/chunks/864-bf315a5307aba1d7.js"],"name":"","async":false} a:I{"id":18639,"chunks":["272:static/chunks/webpack-04ed420267a761a9.js","971:static/chunks/fd9d1056-5dfc77aa37d8c76f.js","864:static/chunks/864-bf315a5307aba1d7.js"],"name":"","async":false} c:I{"id":65146,"chunks":["272:static/chunks/webpack-04ed420267a761a9.js","971:static/chunks/fd9d1056-5dfc77aa37d8c76f.js","864:static/chunks/864-bf315a5307aba1d7.js"],"name":"","async":false} -d:I{"id":25454,"chunks":["400:static/chunks/400-bab9e88e0219f9f5.js","362:static/chunks/362-ae0994d279f3f3bb.js","703:static/chunks/703-35aa8c1eaf8df6ef.js","894:static/chunks/894-f0d1adefd8c6331e.js","931:static/chunks/app/page-11121665fe0055a9.js"],"name":"","async":false} +d:I{"id":25454,"chunks":["400:static/chunks/400-bab9e88e0219f9f5.js","362:static/chunks/362-ae0994d279f3f3bb.js","703:static/chunks/703-35aa8c1eaf8df6ef.js","894:static/chunks/894-f0d1adefd8c6331e.js","931:static/chunks/app/page-478c8032840b58db.js"],"name":"","async":false} 4:[null,["$","html",null,{"lang":"en","suppressHydrationWarning":true,"children":[["$","head",null,{}],["$","body",null,{"className":"font-sans antialiased __variable_e66fe9 __variable_bd9c35","children":[["$","$L6",null,{}],["$","$L7",null,{"attribute":"class","defaultTheme":"system","enableSystem":true,"children":[["$","div",null,{"className":"flex min-h-screen flex-col","children":[["$","$L8",null,{}],["$","main",null,{"className":"flex flex-1 flex-col bg-muted/50","children":["$","$L9",null,{"parallelRouterKey":"children","segmentPath":["children"],"loading":"$undefined","loadingStyles":"$undefined","hasLoading":false,"error":"$undefined","errorStyles":"$undefined","template":["$","$La",null,{}],"templateStyles":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":"404"}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[],"childProp":{"current":["$Lb",["$","$Lc",null,{"propsForComponent":{"params":{}},"Component":"$d"}],null],"segment":"__PAGE__"},"styles":[]}]}]]}],null]}]]}]]}],null] 5:[["$","meta","0",{"charSet":"utf-8"}],["$","title","1",{"children":"Tabby - Home"}],["$","meta","2",{"name":"description","content":"Tabby, an opensource, self-hosted AI coding assistant."}],["$","meta","3",{"name":"theme-color","media":"(prefers-color-scheme: light)","content":"white"}],["$","meta","4",{"name":"theme-color","media":"(prefers-color-scheme: dark)","content":"black"}],["$","meta","5",{"name":"viewport","content":"width=device-width, initial-scale=1"}],["$","meta","6",{"name":"next-size-adjust"}]] b:null diff --git a/crates/tabby/ui/playground.html b/crates/tabby/ui/playground.html index 4ce3be4903f2..2f0b645ff62f 100644 --- a/crates/tabby/ui/playground.html +++ b/crates/tabby/ui/playground.html @@ -1 +1 @@ -Tabby - Playground

Welcome to Playground!

You can start a conversation here or try the following examples:

\ No newline at end of file +Tabby - Playground

Welcome to Playground!

You can start a conversation here or try the following examples:

\ No newline at end of file diff --git a/crates/tabby/ui/playground.txt b/crates/tabby/ui/playground.txt index c23a65ce1705..7f135ea13ff3 100644 --- a/crates/tabby/ui/playground.txt +++ b/crates/tabby/ui/playground.txt @@ -1,7 +1,7 @@ 1:HL["/_next/static/media/86fdec36ddd9097e-s.p.woff2","font",{"crossOrigin":"","type":"font/woff2"}] 2:HL["/_next/static/media/c9a5bc6a7c948fb0-s.p.woff2","font",{"crossOrigin":"","type":"font/woff2"}] 3:HL["/_next/static/css/2b051a9b83c80bf9.css","style"] -0:["OqK3ih1CowLA0x8lARuCQ",[[["",{"children":["playground",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",true],"$L4",[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/2b051a9b83c80bf9.css","precedence":"next"}]],"$L5"]]]] +0:["QrHYrv6IM9fXxh7mpanWB",[[["",{"children":["playground",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",true],"$L4",[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/2b051a9b83c80bf9.css","precedence":"next"}]],"$L5"]]]] 6:I{"id":5925,"chunks":["400:static/chunks/400-bab9e88e0219f9f5.js","406:static/chunks/406-35481e1b86c5b377.js","362:static/chunks/362-ae0994d279f3f3bb.js","563:static/chunks/563-52218f82bb9eb225.js","894:static/chunks/894-f0d1adefd8c6331e.js","185:static/chunks/app/layout-f087fba7a4279e51.js"],"name":"Toaster","async":false} 7:I{"id":78495,"chunks":["400:static/chunks/400-bab9e88e0219f9f5.js","406:static/chunks/406-35481e1b86c5b377.js","362:static/chunks/362-ae0994d279f3f3bb.js","563:static/chunks/563-52218f82bb9eb225.js","894:static/chunks/894-f0d1adefd8c6331e.js","185:static/chunks/app/layout-f087fba7a4279e51.js"],"name":"Providers","async":false} 8:I{"id":79446,"chunks":["400:static/chunks/400-bab9e88e0219f9f5.js","406:static/chunks/406-35481e1b86c5b377.js","362:static/chunks/362-ae0994d279f3f3bb.js","563:static/chunks/563-52218f82bb9eb225.js","894:static/chunks/894-f0d1adefd8c6331e.js","185:static/chunks/app/layout-f087fba7a4279e51.js"],"name":"Header","async":false} @@ -9,5 +9,5 @@ a:I{"id":18639,"chunks":["272:static/chunks/webpack-04ed420267a761a9.js","971:static/chunks/fd9d1056-5dfc77aa37d8c76f.js","864:static/chunks/864-bf315a5307aba1d7.js"],"name":"","async":false} c:I{"id":12202,"chunks":["400:static/chunks/400-bab9e88e0219f9f5.js","406:static/chunks/406-35481e1b86c5b377.js","28:static/chunks/28-27d0fe8a88c4cbfb.js","894:static/chunks/894-f0d1adefd8c6331e.js","383:static/chunks/app/playground/page-b742820613e86585.js"],"name":"Chat","async":false} 5:[["$","meta","0",{"charSet":"utf-8"}],["$","title","1",{"children":"Tabby - Playground"}],["$","meta","2",{"name":"description","content":"Tabby, an opensource, self-hosted AI coding assistant."}],["$","meta","3",{"name":"theme-color","media":"(prefers-color-scheme: light)","content":"white"}],["$","meta","4",{"name":"theme-color","media":"(prefers-color-scheme: dark)","content":"black"}],["$","meta","5",{"name":"viewport","content":"width=device-width, initial-scale=1"}],["$","meta","6",{"name":"next-size-adjust"}]] -4:[null,["$","html",null,{"lang":"en","suppressHydrationWarning":true,"children":[["$","head",null,{}],["$","body",null,{"className":"font-sans antialiased __variable_e66fe9 __variable_bd9c35","children":[["$","$L6",null,{}],["$","$L7",null,{"attribute":"class","defaultTheme":"system","enableSystem":true,"children":[["$","div",null,{"className":"flex min-h-screen flex-col","children":[["$","$L8",null,{}],["$","main",null,{"className":"flex flex-1 flex-col bg-muted/50","children":["$","$L9",null,{"parallelRouterKey":"children","segmentPath":["children"],"loading":"$undefined","loadingStyles":"$undefined","hasLoading":false,"error":"$undefined","errorStyles":"$undefined","template":["$","$La",null,{}],"templateStyles":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":"404"}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[],"childProp":{"current":["$","$L9",null,{"parallelRouterKey":"children","segmentPath":["children","playground","children"],"loading":"$undefined","loadingStyles":"$undefined","hasLoading":false,"error":"$undefined","errorStyles":"$undefined","template":["$","$La",null,{}],"templateStyles":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","childProp":{"current":["$Lb",["$","$Lc",null,{"id":"j07pYnp"}],null],"segment":"__PAGE__"},"styles":[]}],"segment":"playground"},"styles":[]}]}]]}],null]}]]}]]}],null] +4:[null,["$","html",null,{"lang":"en","suppressHydrationWarning":true,"children":[["$","head",null,{}],["$","body",null,{"className":"font-sans antialiased __variable_e66fe9 __variable_bd9c35","children":[["$","$L6",null,{}],["$","$L7",null,{"attribute":"class","defaultTheme":"system","enableSystem":true,"children":[["$","div",null,{"className":"flex min-h-screen flex-col","children":[["$","$L8",null,{}],["$","main",null,{"className":"flex flex-1 flex-col bg-muted/50","children":["$","$L9",null,{"parallelRouterKey":"children","segmentPath":["children"],"loading":"$undefined","loadingStyles":"$undefined","hasLoading":false,"error":"$undefined","errorStyles":"$undefined","template":["$","$La",null,{}],"templateStyles":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":"404"}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[],"childProp":{"current":["$","$L9",null,{"parallelRouterKey":"children","segmentPath":["children","playground","children"],"loading":"$undefined","loadingStyles":"$undefined","hasLoading":false,"error":"$undefined","errorStyles":"$undefined","template":["$","$La",null,{}],"templateStyles":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","childProp":{"current":["$Lb",["$","$Lc",null,{"id":"GG5oy2I"}],null],"segment":"__PAGE__"},"styles":[]}],"segment":"playground"},"styles":[]}]}]]}],null]}]]}]]}],null] b:null diff --git a/ee/tabby-ui/app/page.tsx b/ee/tabby-ui/app/page.tsx index b57efeac8f97..c253221e7118 100644 --- a/ee/tabby-ui/app/page.tsx +++ b/ee/tabby-ui/app/page.tsx @@ -95,13 +95,11 @@ function MainPanel() { - {healthInfo.model && ( - - )} + {healthInfo.chat_model && (