mirror of
https://github.com/discourse/discourse-ai.git
synced 2025-07-03 21:12:13 +00:00
DEV: supports for form-kit changes (#1203)
form.Object and form.Collection have been changed. Most importantly formObject doesnt yield name but data. It's not your responsibility to build an array of fields.
This commit is contained in:
parent
de8624416a
commit
75a1ade441
@ -1,3 +1,4 @@
|
|||||||
|
< 3.5.0.beta2-dev: de8624416a15b3d8e7ad350b083cc1420451ccec
|
||||||
< 3.5.0.beta1-dev: bdef136080074a993e7c4f5ca562edc31a8ba756
|
< 3.5.0.beta1-dev: bdef136080074a993e7c4f5ca562edc31a8ba756
|
||||||
< 3.4.0.beta4-dev: a53719ab8eb071459f215227421b3ea4987e5f87
|
< 3.4.0.beta4-dev: a53719ab8eb071459f215227421b3ea4987e5f87
|
||||||
< 3.4.0.beta4-dev: 20612fde52d3f740cad64823ef8aadb0748b567f
|
< 3.4.0.beta4-dev: 20612fde52d3f740cad64823ef8aadb0748b567f
|
||||||
|
@ -493,8 +493,8 @@ export default class AiEmbeddingEditor extends Component {
|
|||||||
|
|
||||||
{{! provider-specific content }}
|
{{! provider-specific content }}
|
||||||
{{#if this.currentProvider}}
|
{{#if this.currentProvider}}
|
||||||
{{#if data.provider_params}}
|
<form.Object @name="provider_params" as |object providerData|>
|
||||||
<form.Object @name="provider_params" as |object name|>
|
{{#each-in providerData as |name|}}
|
||||||
{{#let (get this.providerParams name) as |params|}}
|
{{#let (get this.providerParams name) as |params|}}
|
||||||
{{#if params}}
|
{{#if params}}
|
||||||
<object.Field
|
<object.Field
|
||||||
@ -523,9 +523,9 @@ export default class AiEmbeddingEditor extends Component {
|
|||||||
</object.Field>
|
</object.Field>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{/let}}
|
{{/let}}
|
||||||
|
{{/each-in}}
|
||||||
</form.Object>
|
</form.Object>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{/if}}
|
|
||||||
|
|
||||||
<form.Actions class="ai-embedding-editor__action_panel">
|
<form.Actions class="ai-embedding-editor__action_panel">
|
||||||
<form.Button
|
<form.Button
|
||||||
@ -550,15 +550,7 @@ export default class AiEmbeddingEditor extends Component {
|
|||||||
</form.Actions>
|
</form.Actions>
|
||||||
|
|
||||||
{{#if this.displayTestResult}}
|
{{#if this.displayTestResult}}
|
||||||
<form.Field
|
<form.Container @format="full" class="ai-embedding-editor-tests">
|
||||||
@showTitle={{false}}
|
|
||||||
@name="test_results"
|
|
||||||
@title="test_results"
|
|
||||||
@format="full"
|
|
||||||
class="ai-embedding-editor-tests"
|
|
||||||
as |field|
|
|
||||||
>
|
|
||||||
<field.Custom>
|
|
||||||
<ConditionalLoadingSpinner
|
<ConditionalLoadingSpinner
|
||||||
@size="small"
|
@size="small"
|
||||||
@condition={{this.testRunning}}
|
@condition={{this.testRunning}}
|
||||||
@ -575,8 +567,7 @@ export default class AiEmbeddingEditor extends Component {
|
|||||||
</div>
|
</div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</ConditionalLoadingSpinner>
|
</ConditionalLoadingSpinner>
|
||||||
</field.Custom>
|
</form.Container>
|
||||||
</form.Field>
|
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</Form>
|
</Form>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
@ -334,14 +334,17 @@ export default class AiLlmEditorForm extends Component {
|
|||||||
<field.Password />
|
<field.Password />
|
||||||
</form.Field>
|
</form.Field>
|
||||||
|
|
||||||
<form.Object @name="provider_params" as |object name|>
|
<form.Object @name="provider_params" as |object providerParamsData|>
|
||||||
|
{{#each-in providerParamsData as |name|}}
|
||||||
{{#let
|
{{#let
|
||||||
(get (this.metaProviderParams data.provider) name)
|
(get (this.metaProviderParams data.provider) name)
|
||||||
as |params|
|
as |params|
|
||||||
}}
|
}}
|
||||||
<object.Field
|
<object.Field
|
||||||
@name={{name}}
|
@name={{name}}
|
||||||
@title={{i18n (concat "discourse_ai.llms.provider_fields." name)}}
|
@title={{i18n
|
||||||
|
(concat "discourse_ai.llms.provider_fields." name)
|
||||||
|
}}
|
||||||
@format="large"
|
@format="large"
|
||||||
as |field|
|
as |field|
|
||||||
>
|
>
|
||||||
@ -360,6 +363,7 @@ export default class AiLlmEditorForm extends Component {
|
|||||||
{{/if}}
|
{{/if}}
|
||||||
</object.Field>
|
</object.Field>
|
||||||
{{/let}}
|
{{/let}}
|
||||||
|
{{/each-in}}
|
||||||
</form.Object>
|
</form.Object>
|
||||||
|
|
||||||
<form.Field
|
<form.Field
|
||||||
@ -555,14 +559,7 @@ export default class AiLlmEditorForm extends Component {
|
|||||||
{{/unless}}
|
{{/unless}}
|
||||||
|
|
||||||
{{#if this.displayTestResult}}
|
{{#if this.displayTestResult}}
|
||||||
<form.Field
|
<form.Container @format="full">
|
||||||
@showTitle={{false}}
|
|
||||||
@name="test_results"
|
|
||||||
@title="test_results"
|
|
||||||
@format="full"
|
|
||||||
as |field|
|
|
||||||
>
|
|
||||||
<field.Custom>
|
|
||||||
<ConditionalLoadingSpinner
|
<ConditionalLoadingSpinner
|
||||||
@size="small"
|
@size="small"
|
||||||
@condition={{this.testRunning}}
|
@condition={{this.testRunning}}
|
||||||
@ -579,8 +576,7 @@ export default class AiLlmEditorForm extends Component {
|
|||||||
</div>
|
</div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</ConditionalLoadingSpinner>
|
</ConditionalLoadingSpinner>
|
||||||
</field.Custom>
|
</form.Container>
|
||||||
</form.Field>
|
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</Form>
|
</Form>
|
||||||
</template>
|
</template>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user