Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions apiclient/types/invoke.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,10 @@ type Prompt struct {

// Field should match exactly what is in the GPTScript SDK
type Field struct {
Name string `json:"name,omitempty"`
Sensitive *bool `json:"sensitive,omitempty"`
Description string `json:"description,omitempty"`
Name string `json:"name,omitempty"`
Sensitive *bool `json:"sensitive,omitempty"`
Description string `json:"description,omitempty"`
Options []string `json:"options,omitempty"`
}

type Fields []Field
Expand All @@ -103,6 +104,7 @@ func ToFields(fields gptscript.Fields) Fields {
Name: field.Name,
Sensitive: field.Sensitive,
Description: field.Description,
Options: field.Options,
}
}
return f
Expand Down
5 changes: 5 additions & 0 deletions apiclient/types/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ require (
github.com/google/uuid v1.6.0
github.com/gptscript-ai/chat-completion-client v0.0.0-20250224164718-139cb4507b1d
github.com/gptscript-ai/cmd v0.0.0-20250122115124-a3d65e9d2432
github.com/gptscript-ai/go-gptscript v0.9.6-0.20250314150104-8d1f06fa87a4
github.com/gptscript-ai/gptscript v0.9.6-0.20250328171703-550d649b5fe1
github.com/gptscript-ai/go-gptscript v0.9.6-0.20250331192455-415de950d72d
github.com/gptscript-ai/gptscript v0.9.6-0.20250328194144-ce3b7262ed0e
github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de
github.com/mhale/smtpd v0.8.3
github.com/obot-platform/kinm v0.0.0-20250307141751-3a6f13867f67
Expand Down
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -297,10 +297,10 @@ github.com/gptscript-ai/chat-completion-client v0.0.0-20250224164718-139cb4507b1
github.com/gptscript-ai/chat-completion-client v0.0.0-20250224164718-139cb4507b1d/go.mod h1:7P/o6/IWa1KqsntVf68hSnLKuu3+xuqm6lYhch1w4jo=
github.com/gptscript-ai/cmd v0.0.0-20250122115124-a3d65e9d2432 h1:cJh/Hl1HFd1qLpdkaZvsFTC2mXlIuiK7FgvSfaSOWmw=
github.com/gptscript-ai/cmd v0.0.0-20250122115124-a3d65e9d2432/go.mod h1:DJAo1xTht1LDkNYFNydVjTHd576TC7MlpsVRl3oloVw=
github.com/gptscript-ai/go-gptscript v0.9.6-0.20250314150104-8d1f06fa87a4 h1:V30gwE9c6yEYQmWoKCvrfpGmsTTlEicHr5nGJZV4Uyk=
github.com/gptscript-ai/go-gptscript v0.9.6-0.20250314150104-8d1f06fa87a4/go.mod h1:QvGPZoRuAiA8P5EzPI05kTrs+LZ0ipHywUGsKruSknw=
github.com/gptscript-ai/gptscript v0.9.6-0.20250328171703-550d649b5fe1 h1:AMtjmE+yY01McVzEGbQ3TZ6fFxuZh63zgs0xNUGWKDc=
github.com/gptscript-ai/gptscript v0.9.6-0.20250328171703-550d649b5fe1/go.mod h1:wQ9GU40Po6fSBEciAQI2kxeo32qK4DybbpD6bIOBPtM=
github.com/gptscript-ai/go-gptscript v0.9.6-0.20250331192455-415de950d72d h1:S9gfdnk0VK3dSFOHn/rhPWBbbOoC64uy38rRKIPLLcQ=
github.com/gptscript-ai/go-gptscript v0.9.6-0.20250331192455-415de950d72d/go.mod h1:QvGPZoRuAiA8P5EzPI05kTrs+LZ0ipHywUGsKruSknw=
github.com/gptscript-ai/gptscript v0.9.6-0.20250328194144-ce3b7262ed0e h1:v0j1Vb1g6zVN4YbcV8kBc/nJRXiy5kWOTBnEW+vAbvs=
github.com/gptscript-ai/gptscript v0.9.6-0.20250328194144-ce3b7262ed0e/go.mod h1:wQ9GU40Po6fSBEciAQI2kxeo32qK4DybbpD6bIOBPtM=
github.com/gptscript-ai/tui v0.0.0-20250204145344-33cd15de4cee h1:70PHW6Xw70yNNZ5aX936XqcMLwNmfMZpCV3FCOGKpxE=
github.com/gptscript-ai/tui v0.0.0-20250204145344-33cd15de4cee/go.mod h1:iwHxuueg2paOak7zIg0ESBWx7A0wIHGopAratbgaPNY=
github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7 h1:pdN6V1QBWetyv/0+wjACpqVH+eVULgEjkurDLq3goeM=
Expand Down
14 changes: 14 additions & 0 deletions pkg/storage/openapi/generated/openapi_generated.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 16 additions & 6 deletions ui/user/src/lib/components/messages/Message.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -432,12 +432,22 @@
{#each msg.fields as field}
<div class="flex flex-col gap-1">
<label for={field.name} class="mt-1 text-sm font-medium">{field.name}</label>
<input
class="rounded-lg bg-white p-2 outline-hidden dark:bg-gray-900"
type={field.sensitive ? 'password' : 'text'}
name={field.name}
bind:value={promptCredentials[field.name]}
/>
{#if field.options}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

new ui components to handle field with options. For now, it is buttons but we can customize it to be dropdowns

<div class="flex flex-col gap-2">
{#each field.options as option}
<button class="button" onclick={() => (promptCredentials[field.name] = option)}>
{option}
</button>
{/each}
</div>
{:else}
<input
class="rounded-lg bg-white p-2 outline-hidden dark:bg-gray-900"
type={field.sensitive ? 'password' : 'text'}
name={field.name}
bind:value={promptCredentials[field.name]}
/>
{/if}
{#if field.description}
<p class="text-sm text-gray-500">{field.description}</p>
{/if}
Expand Down
5 changes: 4 additions & 1 deletion ui/user/src/lib/components/navbar/Credentials.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@
}
</script>

<dialog bind:this={dialog} class="h-1/4 min-h-[300px] w-1/3 min-w-[300px] overflow-visible p-5">
<dialog
bind:this={dialog}
class="max-h-[90vh] min-h-[300px] w-1/3 min-w-[300px] overflow-visible p-5"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fix the dialog not extending :)

>
<div class="flex h-full flex-col">
<button class="absolute top-0 right-0 p-3" onclick={() => dialog?.close()}>
<X class="icon-default" />
Expand Down
1 change: 1 addition & 0 deletions ui/user/src/lib/services/chat/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ type PromptField = {
name: string;
description?: string;
sensitive?: boolean;
options?: string[];
};

type ToolInput = {
Expand Down