Rebuild time
This commit is contained in:
@@ -24,7 +24,7 @@ require (
|
||||
github.com/gorilla/mux v1.8.1
|
||||
github.com/h2non/filetype v1.1.3
|
||||
github.com/satori/go.uuid v1.2.0
|
||||
github.com/shuffle/shuffle-shared v0.9.6
|
||||
github.com/shuffle/shuffle-shared v0.9.8
|
||||
github.com/shuffle/singul v0.0.16
|
||||
golang.org/x/crypto v0.40.0
|
||||
google.golang.org/api v0.236.0
|
||||
|
||||
@@ -363,8 +363,8 @@ github.com/sendgrid/sendgrid-go v3.16.1+incompatible h1:zWhTmB0Y8XCDzeWIm2/BIt1G
|
||||
github.com/sendgrid/sendgrid-go v3.16.1+incompatible/go.mod h1:QRQt+LX/NmgVEvmdRw0VT/QgUn499+iza2FnDca9fg8=
|
||||
github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3 h1:n661drycOFuPLCN3Uc8sB6B/s6Z4t2xvBgU1htSHuq8=
|
||||
github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3/go.mod h1:A0bzQcvG0E7Rwjx0REVgAGH58e96+X0MeOfepqsbeW4=
|
||||
github.com/shuffle/shuffle-shared v0.9.6 h1:oFPJIb6er5ILQ4KALkpNzd34qoQlgT6XQUPVEgr5F9g=
|
||||
github.com/shuffle/shuffle-shared v0.9.6/go.mod h1:klSHfahYORgrQS4AdG5RIfTaL4lakbJ+R9EXfc7QQo0=
|
||||
github.com/shuffle/shuffle-shared v0.9.8 h1:WmfZQ6IhtjGTwyKv1US1Qu5qK6VXfzFOQ+mNY8uuD4w=
|
||||
github.com/shuffle/shuffle-shared v0.9.8/go.mod h1:klSHfahYORgrQS4AdG5RIfTaL4lakbJ+R9EXfc7QQo0=
|
||||
github.com/shuffle/singul v0.0.16 h1:dW+0Mln9R1aUJ0fjikpWcxbjoQWqJHxe4kSxh2tQN5E=
|
||||
github.com/shuffle/singul v0.0.16/go.mod h1:LYkp320A6gsoPlYbXUM+WvEPUVAuutlSsqnVKyRy4gs=
|
||||
github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0=
|
||||
|
||||
@@ -4491,6 +4491,10 @@ func runInitEs(ctx context.Context) {
|
||||
|
||||
// Hotloads locally
|
||||
location := os.Getenv("SHUFFLE_APP_HOTLOAD_FOLDER")
|
||||
if len(location) == 0 {
|
||||
location = "./shuffle-apps"
|
||||
}
|
||||
|
||||
if len(location) != 0 {
|
||||
handleAppHotload(ctx, location, false)
|
||||
}
|
||||
@@ -5332,6 +5336,8 @@ func initHandlers() {
|
||||
|
||||
// First v2 API
|
||||
r.HandleFunc("/api/v2/workflows/{key}/executions", shuffle.GetWorkflowExecutionsV2).Methods("GET", "OPTIONS")
|
||||
r.HandleFunc("/api/v2/workflows/generate/llm", shuffle.HandleWorkflowGenerationResponse).Methods("POST", "OPTIONS")
|
||||
r.HandleFunc("/api/v2/workflows/edit/llm", shuffle.HandleEditWorkflowWithLLM).Methods("POST", "OPTIONS")
|
||||
|
||||
// New for recommendations in Shuffle
|
||||
r.HandleFunc("/api/v1/recommendations/get_actions", shuffle.HandleActionRecommendation).Methods("POST", "OPTIONS")
|
||||
|
||||
@@ -2182,17 +2182,24 @@ func handleSingleAppHotloadRequest(resp http.ResponseWriter, request *http.Reque
|
||||
resp.Write([]byte(`{"success": false}`))
|
||||
return
|
||||
}
|
||||
|
||||
if user.Role != "admin" {
|
||||
resp.WriteHeader(401)
|
||||
resp.Write([]byte(`{"success": false, "reason": "Must be admin to hotload apps"}`))
|
||||
return
|
||||
}
|
||||
|
||||
location := os.Getenv("SHUFFLE_APP_HOTLOAD_FOLDER")
|
||||
if len(location) == 0 {
|
||||
location = "./shuffle-apps"
|
||||
}
|
||||
|
||||
if len(location) == 0 {
|
||||
resp.WriteHeader(500)
|
||||
resp.Write([]byte(fmt.Sprintf(`{"success": false, "reason": "SHUFFLE_APP_HOTLOAD_FOLDER not specified in .env"}`)))
|
||||
return
|
||||
}
|
||||
|
||||
requestUrlFields := strings.Split(request.URL.String(), "/")
|
||||
var appName string
|
||||
if requestUrlFields[1] == "api" {
|
||||
@@ -2256,6 +2263,10 @@ func handleAppHotloadRequest(resp http.ResponseWriter, request *http.Request) {
|
||||
}
|
||||
|
||||
location := os.Getenv("SHUFFLE_APP_HOTLOAD_FOLDER")
|
||||
if len(location) == 0 {
|
||||
location = "./shuffle-apps"
|
||||
}
|
||||
|
||||
if len(location) == 0 {
|
||||
resp.WriteHeader(500)
|
||||
resp.Write([]byte(fmt.Sprintf(`{"success": false, "reason": "SHUFFLE_APP_HOTLOAD_FOLDER not specified in .env"}`)))
|
||||
|
||||
@@ -464,6 +464,7 @@ const EditWorkflow = (props) => {
|
||||
<span>
|
||||
<Button
|
||||
id="ai-generate-button"
|
||||
style={{marginLeft: 10, }}
|
||||
disabled={
|
||||
name.length === 0 ||
|
||||
aiGenerateLoading === true ||
|
||||
@@ -484,7 +485,7 @@ const EditWorkflow = (props) => {
|
||||
// check AI enabled for local installations (not cloud)
|
||||
if (!isCloud && (!userdata?.ai_enabled || userdata?.ai_enabled === false)) {
|
||||
// Toast with onclick
|
||||
toast.info("AI credits haven't been applied and no Local AI is not enabled. Click here to set it up!", {
|
||||
toast.info("Local AI is not enabled, and no cloud AI credits added. Click here to set it up!", {
|
||||
autoClose: 10000,
|
||||
onClick: () => {
|
||||
window.open("/docs/AI#self-hosting-models", "_blank")
|
||||
|
||||
@@ -131,8 +131,15 @@ const WorkflowGenerationModal = (props) => {
|
||||
.then((response) => {
|
||||
return response.json().then((json) => {
|
||||
if (response.status !== 200) {
|
||||
toast.error(json.message || "Unexpected response. Please contact support@shuffler.io if this persists.");
|
||||
toast.error(json.reason || "Unexpected response. Please contact support@shuffler.io if this persists.", {
|
||||
autoClose: 10000,
|
||||
onClick: () => {
|
||||
window.open("/docs/AI#self-hosting-models", "_blank")
|
||||
}
|
||||
})
|
||||
|
||||
setIsAiEditing(false);
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
@@ -11992,7 +11992,19 @@ const AngularWorkflow = (defaultprops) => {
|
||||
const json = await response.json();
|
||||
|
||||
if (response.status !== 200) {
|
||||
toast(json.message || "Unexpected response");
|
||||
if (json.reason !== undefined && json.reason !== null && json.reason.length > 0) {
|
||||
toast.error("Workflow generation failed: " + json.reason)
|
||||
}
|
||||
|
||||
if (!isCloud) {
|
||||
toast.info("Click here to set up a local LLM!", {
|
||||
autoClose: 10000,
|
||||
onClick: () => {
|
||||
window.open("/docs/AI#self-hosting-models", "_blank")
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -20969,10 +20981,10 @@ const AngularWorkflow = (defaultprops) => {
|
||||
</Tooltip>
|
||||
: null}
|
||||
|
||||
{userdata.support == true ?
|
||||
{userdata.support == true || !isCloud ?
|
||||
<Tooltip
|
||||
color="secondary"
|
||||
title="Generate workflow (support only)"
|
||||
title="Generate workflow (requires LLM model)"
|
||||
placement="top-start"
|
||||
>
|
||||
<span>
|
||||
|
||||
Reference in New Issue
Block a user