File tree Expand file tree Collapse file tree 3 files changed +10
-5
lines changed Expand file tree Collapse file tree 3 files changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -10,16 +10,16 @@ const PORT = ":8000"
1010
1111func GetAppHandler (isStatic bool ) * app.Handler {
1212 handler := & app.Handler {
13- Title : "Master Prompt Builder " ,
14- Name : "Master prompt builder " ,
15- Description : "Will help you with building agents " ,
13+ Title : "Prompt Composer " ,
14+ Name : "Prompt Composer " ,
15+ Description : "Will help you with building master prompts " ,
1616 Version : uuid .New ().String (),
1717 }
1818
1919 styles := []string {"/bundle.css" }
2020
2121 if isStatic {
22- handler .Resources = app .GitHubPages ("agent- prompt-builder " )
22+ handler .Resources = app .GitHubPages ("prompt-composer " )
2323 } else {
2424 var tmpStyles []string
2525 for _ , style := range styles {
Original file line number Diff line number Diff line change @@ -13,6 +13,11 @@ import (
1313type TemplateEditorComponent struct {
1414 app.Compo
1515 MasterPrompt domain.MasterPrompt
16+ currentText string // mutable during lifecycle, loaded OnMount
17+ }
18+
19+ func (t * TemplateEditorComponent ) OnMount (ctx app.Context ) {
20+ t .currentText = string (t .MasterPrompt .Template )
1621}
1722
1823func (t * TemplateEditorComponent ) Render () app.UI {
@@ -63,7 +68,7 @@ func (t *TemplateEditorComponent) Render() app.UI {
6368 }),
6469 app .Textarea ().Class ("textarea textarea-bordered h-80 w-full" ).
6570 Placeholder ("Enter your master prompt template here" ).
66- Text (t .MasterPrompt . Template ).
71+ Text (t .currentText ).
6772 OnChange (onMasterPromptTemplateChanged ).OnKeyUp (onMasterPromptTemplateChanged ),
6873 },
6974 }
You can’t perform that action at this time.
0 commit comments