Add full ToolSource support to registry
- Add source_json column to store complete source attribution - Update publish API to accept source object or legacy string - Update get_tool API to return parsed source object - Update web UI to display type, author, license, url, original_tool - Add gunicorn config and dependency for production server Co-Authored-By: Claude Opus 4.5 <[email protected]>
This commit is contained in:
@@ -68,19 +68,34 @@
|
||||
|
||||
{% if tool.source %}
|
||||
<div class="mt-4 p-3 bg-amber-50 border border-amber-200 rounded-lg">
|
||||
<div class="flex items-center">
|
||||
<svg class="w-5 h-5 text-amber-600 mr-2" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||
<div class="flex items-start">
|
||||
<svg class="w-5 h-5 text-amber-600 mr-2 mt-0.5 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"/>
|
||||
</svg>
|
||||
<span class="text-sm text-amber-800">
|
||||
Based on
|
||||
{% if tool.source_url %}
|
||||
<a href="{{ tool.source_url }}" target="_blank" rel="noopener" class="font-medium underline hover:text-amber-900">{{ tool.source }}</a>
|
||||
<div class="text-sm text-amber-800">
|
||||
{% if tool.source.type == 'forked' %}
|
||||
<span class="font-medium">Forked from</span>
|
||||
{% elif tool.source.type == 'imported' %}
|
||||
<span class="font-medium">Based on</span>
|
||||
{% else %}
|
||||
<span class="font-medium">{{ tool.source }}</span>
|
||||
<span class="font-medium">Source:</span>
|
||||
{% endif %}
|
||||
pattern
|
||||
</span>
|
||||
{% if tool.source.original_tool %}
|
||||
{% if tool.source.url %}
|
||||
<a href="{{ tool.source.url }}" target="_blank" rel="noopener" class="font-medium underline hover:text-amber-900">{{ tool.source.original_tool }}</a>
|
||||
{% else %}
|
||||
<span class="font-medium">{{ tool.source.original_tool }}</span>
|
||||
{% endif %}
|
||||
{% elif tool.source.url %}
|
||||
<a href="{{ tool.source.url }}" target="_blank" rel="noopener" class="font-medium underline hover:text-amber-900">{{ tool.source.url }}</a>
|
||||
{% endif %}
|
||||
{% if tool.source.author %}
|
||||
<span class="block mt-1">Author: <span class="font-medium">{{ tool.source.author }}</span></span>
|
||||
{% endif %}
|
||||
{% if tool.source.license %}
|
||||
<span class="block mt-1">License: <span class="font-medium">{{ tool.source.license }}</span></span>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
Reference in New Issue
Block a user