-
Notifications
You must be signed in to change notification settings - Fork 102
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Generate layout with SQL query or AI prompt
- Loading branch information
1 parent
9117665
commit 57c0a6c
Showing
29 changed files
with
471 additions
and
146 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
module Components.Slices.LlmKey exposing (promptLlmKey) | ||
|
||
import Components.Atoms.Icon as Icon | ||
import Html exposing (br, p, text) | ||
import Html.Attributes exposing (class) | ||
import Libs.Html exposing (extLink) | ||
import Libs.Tailwind as Tw | ||
import Libs.Task as T | ||
import Shared exposing (Prompt) | ||
|
||
|
||
promptLlmKey : (Prompt msg -> String -> msg) -> (String -> msg) -> msg | ||
promptLlmKey openPrompt updateLlmKey = | ||
openPrompt | ||
{ color = Tw.blue | ||
, icon = Just Icon.Key | ||
, title = "OpenAI API Key" | ||
, message = | ||
p [] | ||
[ text "Please enter your OpenAI API Key to use it within Azimutt." | ||
, br [] [] | ||
, text "You can get it on " | ||
, extLink "https://platform.openai.com/api-keys" [ class "link" ] [ text "platform.openai.com/api-keys" ] | ||
, text "." | ||
] | ||
, placeholder = "" | ||
, multiline = False | ||
, confirm = "Save" | ||
, cancel = "Cancel" | ||
, onConfirm = updateLlmKey >> T.send | ||
} | ||
"" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.