Skip to content

Commit

Permalink
Add textarea support
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexProgrammerDE committed Nov 16, 2024
1 parent f0e8a8c commit 17fa02d
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 2 deletions.
1 change: 1 addition & 0 deletions proto/src/main/proto/soulfire/config.proto
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ message StringSetting {
string description = 2;
string def = 3;
bool secret = 4;
bool textarea = 5;
}

message IntSetting {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,8 @@ private static class AIChatBotSettings implements SettingsObject {
You must not say anything that is not safe for work.
You will take any roleplay seriously and follow the player's lead.
You cannot interact with the Minecraft world except by chatting.
Use prefixes to express emotions, do not put names as prefixes.
""".replace("\n", " "))
Use prefixes to express emotions, do not put names as prefixes.""")
.textarea(true)
.build();
public static final StringProperty MODEL =
ImmutableStringProperty.builder()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,7 @@ public List<SettingsPage> exportSettingsMeta() {
.setDescription(stringProperty.description())
.setDef(stringProperty.defaultValue())
.setSecret(stringProperty.secret())
.setTextarea(stringProperty.textarea())
.build())
.build())
.build();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,9 @@ public non-sealed abstract class StringProperty implements Property {
public boolean secret() {
return false;
}

@Value.Default
public boolean textarea() {
return false;
}
}

0 comments on commit 17fa02d

Please sign in to comment.