Files
Yeuoly b97cce7167 enhance(cli/icon): add multiple categories default plugin icons (#388)
* feat: add support for dark icon

- Introduced IconDark field in PluginDeclaration and related structures to support dark mode icons.
- Updated the installation process to handle dark icons.
- Enhanced asset validation to check for the presence of dark icons.

This change improves the visual consistency of plugins in dark mode environments.

* enhance(cli/icon): add plugin icon support with multiple categories

- Added support for light and dark icons for various plugin categories including agent, datasource, extension, model, tool, and trigger.
- Replaced the previous single icon implementation with a structured map for better organization and retrieval of icons based on category and theme.
- Removed the old Python icon file to streamline asset management.

This update improves the visual representation of plugins across different themes, enhancing user experience.

* change icons

* fix

* fix

* comments
2025-07-08 12:48:48 +08:00

22 lines
701 B
Go

package main
import (
"fmt"
"github.com/langgenius/dify-plugin-daemon/internal/utils/parser"
"github.com/langgenius/dify-plugin-daemon/pkg/entities/model_entities"
)
func main() {
const data = `{"data":{"structured_output":{"name":"yeuoly","age":0},"model":"gpt-4o-mini","prompt_messages":[],"system_fingerprint":"fp_34a54ae93c","delta":{"index":0,"message":{"role":"assistant","content":"","name":null,"tool_calls":[]},"usage":null,"finish_reason":null}},"error":""}`
type resp struct {
Data model_entities.LLMResultChunkWithStructuredOutput `json:"data"`
}
output, err := parser.UnmarshalJson[resp](data)
if err != nil {
panic(err)
}
fmt.Println(parser.MarshalJson(output.Data))
}