mirror of
https://github.com/mudler/LocalAI.git
synced 2026-10-28 09:08:54 -04:00
feat(addons): ship Studio and Talk as add-ons instead of built-in pages
Studio and Talk were compiled into the web bundle and always listed in the Add-ons drawer. They are add-ons now, like Voice, Face, fine-tuning and quantization: a person installs and removes them, the drawer lists them only while they are installed, and they are packaged the same way. Move the pages, their components, hooks and helpers into addons/studio and addons/talk. Each has a manifest, a UI bundle, a release platform matrix and a catalog template, and is built by the compat mode of the shared builder. The core API stays where it is: the pages call it with the signed-in person's session. The history keeps its browser storage keys. The unit tests of the moved helpers move with them. In the core, drop the two pages, the Create group of the sidebar (Chat joins Home and Models in the old layout), the built-in catalog entries (the catalog is empty) and the talk locale namespace. The old addresses (/app/studio, /app/talk and the generator links) redirect to the add-on pages, with the model as ?model=. The Home /studio command is offered only while the Studio add-on is installed and opens it. The release workflow and its tests now list seven add-ons. Assisted-by: Claude Code:claude-sonnet-5-5 go node Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
This commit is contained in:
119 files changed
+3401
-164
No files matched your search
@@ -869,7 +869,7 @@ var _ = Describe("catalog template", func() {
|
||||
Expect(entries[0].Arch).NotTo(Equal(entries[1].Arch))
|
||||
})
|
||||
It("renders an entry for every first-party add-on from its own template", func() {
|
||||
for _, id := range []string{"tables", "voice", "face", "fine-tuning", "quantization"} {
|
||||
for _, id := range []string{"tables", "voice", "face", "fine-tuning", "quantization", "studio", "talk"} {
|
||||
p := newProjectFor(id, both)
|
||||
m := p.merged("1.2.3", rev, nil)
|
||||
repoName := newRegistry().repo("addons/" + id)
|
||||
@@ -1038,7 +1038,7 @@ var _ = Describe("workflow policy", func() {
|
||||
})
|
||||
It("rejects a workflow that names one add-on by path or skips an add-on in the matrix", func() {
|
||||
expect(mutate("node \"addons/$ADDON/ui/build.mjs\"\n - name: Fill", "node addons/tables/ui/build.mjs\n - name: Fill"), "P_ADDON_PATH")
|
||||
expect(mutate(" addon: [tables, voice, face, fine-tuning, quantization]\n", " platform: [x]\n"), "P_MATRIX")
|
||||
expect(mutate(" addon: [tables, voice, face, fine-tuning, quantization, studio, talk]\n", " platform: [x]\n"), "P_MATRIX")
|
||||
})
|
||||
It("rejects a plan that does not refuse an add-on without an enabled platform", func() {
|
||||
expect(mutate("has no enabled platform; refusing to publish", "has no platform"), "P_FAIL_CLOSED")
|
||||
@@ -1089,7 +1089,7 @@ var _ = Describe("workflow policy", func() {
|
||||
|
||||
// firstPartyAddons are the add-ons the release workflow packages. The list is
|
||||
// written out so a new add-on is a deliberate change here and in the workflow.
|
||||
var firstPartyAddons = []string{"tables", "voice", "face", "fine-tuning", "quantization"}
|
||||
var firstPartyAddons = []string{"tables", "voice", "face", "fine-tuning", "quantization", "studio", "talk"}
|
||||
|
||||
func readWorkflow(t *testing.T) string {
|
||||
t.Helper()
|
||||
|
||||
@@ -24,7 +24,7 @@ var releasePlatforms = map[string]string{
|
||||
// request. Enabling without this record, or recording without enabling, fails.
|
||||
var nativeChecked = map[string]bool{"linux/amd64": true, "linux/arm64": true, "darwin/arm64": true, "darwin/amd64": true}
|
||||
|
||||
var packagedAddons = []string{"voice", "face", "fine-tuning", "quantization"}
|
||||
var packagedAddons = []string{"voice", "face", "fine-tuning", "quantization", "studio", "talk"}
|
||||
|
||||
func TestEveryPackagedAddonListsEveryReleasePlatformWithItsRunner(t *testing.T) {
|
||||
for _, id := range packagedAddons {
|
||||
|
||||
Reference in new issue
Block a user