```json

By admin, 13 June, 2025
角色
assistant
content

```json
{
"widget": {
"type": "custom-template",
"isAPI": false,
"fullWidth": true,
"html": "<div class=\"container mx-auto px-4 py-8\">\n <div class=\"grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4 xl:grid-cols-5 gap-6\">\n {{#rows}}\n <div class=\"bg-white rounded-2xl shadow-lg overflow-hidden border border-solid border-gray-200 transition-all duration-300 hover:shadow-xl hover:-translate-y-1.5 group relative\">\n <div class=\"absolute top-0 left-0 w-full h-1 {{#isAssistant}}bg-gradient-to-r from-emerald-500 to-teal-600{{/isAssistant}}{{^isAssistant}}bg-gradient-to-r from-blue-500 to-indigo-600{{/isAssistant}}\"></div>\n <div class=\"p-5\">\n <div class=\"mb-2\">\n <h3 class=\"text-lg font-bold text-gray-900 group-hover:{{#isAssistant}}text-teal-600{{/isAssistant}}{{^isAssistant}}text-indigo-600{{/isAssistant}} transition-colors break-words\">{{{title}}}</h3>\n </div>\n <div class=\"mb-3\">\n <span class=\"inline-flex items-center px-3 py-1 rounded-full text-xs font-bold {{#isAssistant}}bg-emerald-50 text-emerald-800 border border-solid border-emerald-200{{/isAssistant}}{{^isAssistant}}bg-blue-50 text-blue-800 border border-solid border-blue-200{{/isAssistant}}\">\n <svg class=\"w-3 h-3 mr-1\" fill=\"currentColor\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\">\n {{#isAssistant}}<path fill-rule=\"evenodd\" d=\"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a1 1 0 000 2v3a1 1 0 001 1h1a1 1 0 100-2v-3a1 1 0 00-1-1H9z\" clip-rule=\"evenodd\"></path>{{/isAssistant}}\n {{^isAssistant}}<path d=\"M10 9a3 3 0 100-6 3 3 0 000 6zm-7 9a7 7 0 1114 0H3z\"></path>{{/isAssistant}}\n </svg>\n {{session_role}}\n </span>\n </div>\n <div class=\"relative mb-4\">\n <p class=\"text-gray-700 text-sm line-clamp-3 h-16 transition-all group-hover:opacity-90\">{{{content}}}</p>\n <div class=\"absolute bottom-0 left-0 w-full h-8 bg-gradient-to-t from-white to-transparent pointer-events-none\"></div>\n </div>\n <div class=\"flex items-center justify-between mb-3\">\n <div class=\"flex items-center bg-gray-100 rounded-lg px-2 py-1\">\n <svg class=\"w-4 h-4 mr-1 {{#isAssistant}}text-teal-500{{/isAssistant}}{{^isAssistant}}text-indigo-500{{/isAssistant}}\" fill=\"currentColor\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M5 4a1 1 0 00-2 0v7.268a2 2 0 000 3.464V16a1 1 0 102 0v-1.268a2 2 0 000-3.464V4zM11 4a1 1 0 10-2 0v1.268a2 2 0 000 3.464V16a1 1 0 102 0V8.732a2 2 0 000-3.464V4zM16 3a1 1 0 011 1v7.268a2 2 0 010 3.464V16a1 1 0 11-2 0v-1.268a2 2 0 010-3.464V4a1 1 0 011-1z\"></path>\n </svg>\n <span class=\"text-xs font-medium text-gray-700\">{{usage}} tokens</span>\n </div>\n <div class=\"flex items-center\">\n <div class=\"w-6 h-6 rounded-full {{#isAssistant}}bg-teal-100 text-teal-800{{/isAssistant}}{{^isAssistant}}bg-indigo-100 text-indigo-800{{/isAssistant}} flex items-center justify-center text-xs font-bold\">{{uid}}</div>\n </div>\n </div>\n <div class=\"flex justify-between items-center text-xs text-gray-500\">\n <span>{{created}}</span>\n <div class=\"flex items-center\">\n <svg class=\"w-3 h-3 mr-1 text-gray-400\" fill=\"none\" stroke=\"currentColor\" viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\">\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z\"></path>\n </svg>\n <span>{{date}}</span>\n </div>\n </div>\n </div>\n </div>\n {{/rows}}\n </div>\n</div>"
},
"next": [
"添加分页功能",
"优化卡片高度",
"增加加载动画",
"添加搜索过滤",
"优化移动端布局"
],
"summary": "已根据API数据动态生成卡片列表,区分了user和assistant角色样式。接下来可以进一步完善分页、搜索等功能。"
}
```