diff --git a/controller/relay-utils.go b/controller/relay-utils.go index 16bf82c..3a556e7 100644 --- a/controller/relay-utils.go +++ b/controller/relay-utils.go @@ -194,12 +194,12 @@ func countTokenMessages(messages []Message, model string) (int, error) { } func countTokenInput(input any, model string) int { - switch input.(type) { + switch v := input.(type) { case string: - return countTokenText(input.(string), model) + return countTokenText(v, model) case []string: text := "" - for _, s := range input.([]string) { + for _, s := range v { text += s } return countTokenText(text, model) diff --git a/web/src/components/ChannelsTable.js b/web/src/components/ChannelsTable.js index ec7640c..1a9e11f 100644 --- a/web/src/components/ChannelsTable.js +++ b/web/src/components/ChannelsTable.js @@ -168,7 +168,7 @@ const ChannelsTable = () => { manageChannel(record.id, 'priority', record, value); }} defaultValue={record.priority} - min={0} + min={-999} /> );