19 Commits

Author SHA1 Message Date
c058a2c8ba refactor(model_plaza): rewrite with DimensionFilter widget, add category/provider DSPY endpoints
- Create plaza_categories.dspy: returns {rows: [{id, name}]} from get_llmcatelogs()
- Create plaza_providers.dspy: returns {rows: [{id, name}]} from get_llmproviders()
- Rewrite model_plaza.ui: replaced old button/grid layout with DimensionFilter widget
- Update plaza_model_cards.ui: accept both new (h_id/v_id/keyword) and old (catelogid/providerid/search) param names
- Update sage/load_path.py: register new DSPY endpoints
2026-07-30 16:13:40 +08:00
c63fb329f4 fix: unescaped double quote in SearchBar script breaks JSON (url:" -> url:') 2026-07-30 11:25:40 +08:00
4db32670e9 fix: getWidgetById from bricks.app root, clear_widgets+widgetBuild for nav
getWidgetById searches DOWNWARD (children), not upward. For ancestor
sage_main_content, must search from bricks.app global root.
Using clear_widgets()+widgetBuild instead of nonexistent set_url().
2026-07-30 11:20:19 +08:00
8d8f9b58a5 fix: use urlwidget actiontype (not script) for internal navigation
Script-based getWidgetById+widgetBuild was async without await,
causing black screen. urlwidget actiontype is Bricks' built-in
navigation mechanism that properly handles async rendering.
2026-07-30 11:17:21 +08:00
1623c891ab fix: use bricks.getWidgetById(sage_main_content) instead of location.href
All filter buttons now internally navigate via:
  bricks.getWidgetById('sage_main_content', bricks.app)
  → clear_widgets() → widgetBuild(urlwidget)
This keeps model_plaza within the app shell instead of standalone page.
2026-07-30 11:11:33 +08:00
9c363bc617 fix: VBox flex:1 wrapper for card scroll, robust search keyword extraction 2026-07-29 18:15:23 +08:00
1a2aa0c0bb fix: RefreshWidget period_seconds:0 infinite loop -> urlwidget 2026-07-29 17:26:58 +08:00
063c0a46bb fix: use relative URL for location.href to stay in workspace 2026-07-29 14:59:17 +08:00
31119554d4 fix: location.href for all nav, no mixed JS/server state, card width:100%
- All filter buttons use location.href with fully server-constructed URLs
  No more mixing {{active_provider}} (stale server var) with dynamic JS state
- SearchBar, category, provider, pagination all use location.href pattern
- Card uses width:100% (fill DynamicColumn slot) + cheight:14 (fixed height)
- Model plaza root is VBox (not VScrollPanel), scroll delegated to cards area
2026-07-29 14:33:09 +08:00
a1a6a583e3 fix: buttons update RefreshWidget directly, VScrollPanel root, cwidth 22
- All filter buttons now script-update rw.opts.url + rw.show_widget()
  instead of urlwidget target navigation (which silently failed)
- Root wrapped in VScrollPanel so scroll position preserved
- Card cwidth 25→22 for better column fit
- Page buttons also use RefreshWidget update pattern
2026-07-29 13:53:23 +08:00
8a3d30c0c6 fix: pricing as string, fixed cwidth 25, pagination (20/page)
- Handle llm.pricing_display when it's a string (not array)
- Card cwidth 15→25 to fill DynamicColumn properly
- Added page/page_size pagination with prev/next buttons
- page param forwarded through model_plaza→plaza_model_cards
2026-07-29 13:37:58 +08:00
7148656f99 fix: dedupe providers, SearchBar input, urlwidget internal nav
- Removed iconid from get_llmproviders GROUP BY (caused duplicates)
- Replaced KeyinText with SearchBar (built-in input+search+clear)
- Switched navigation from window.location.assign to urlwidget
  targeting sage_main_content (stays in workspace, no full reload)
2026-07-29 13:22:53 +08:00
cb53b9aeeb fix: -@ target -> window.location.assign, Input -> KeyinText
-@ is not a valid CSS selector, Bricks parses it as '#@' and fails.
Switched all filter button binds to actiontype:script with window.location.assign().
Replaced nonexistent Input widget with KeyinText for search.
2026-07-29 12:31:40 +08:00
1c25542e72 feat: cockpit-style model plaza with search, category tabs, provider sidebar
New layout:
- Search bar (top) with fuzzy name/description match
- Category tabs (wrapping, single-select)
- Provider sidebar (left, single-select)
- Card grid (right, sorted by name, refreshed on filter change)
- Both category/provider unselected = all published models

Added get_plaza_models() for flat filtered model listing.
Supports combined filtering: provider + category + search.
2026-07-28 17:55:17 +08:00
3d47867bd3 revert(llmage): undo unauthorized model_plaza modification 2026-07-17 16:35:24 +08:00
d82a8b554f feat(llmage): add pricing query tab to model plaza 2026-07-17 16:10:24 +08:00
be3c939955 fix: 模型广场彻底重构 — 移除TabPanel,用VBox+script切换视图
根因链:
1. TabPanel内部容器结构导致getWidgetById找不到tab content中的widget
2. urlwidget渲染后替换自身DOM,id丢失

修复:
- model_plaza.ui: 移除TabPanel,用两个VBox(按分类/按供应商)+script切换display
- plaza_cards_panel/plaza_provider_panel改为VBox容器(urlwidget作子组件),id不丢失
- CSS用#plaza_view_provider{display:none}初始隐藏供应商视图
- 切换按钮用getElementById直接操作display,不依赖bricks widget寻址
- 全链路filler确保VScrollPanel获得确定高度可滚动
2026-06-01 13:44:20 +08:00
fed36ff079 fix: 模型广场导航找不到目标 — 内联布局替代嵌套urlwidget
根因:TabPanel tab content通过urlwidget加载show_llms.ui时,
urlwidget渲染后替换自身DOM,导致plaza_cards_panel的id丢失,
getWidgetById()返回null。

修复:将左右分栏布局直接内联到model_plaza.ui的TabPanel tab content中,
plaza_cards_panel改为VBox容器(保持id),初始内容通过子urlwidget加载,
点击导航按钮时用mode:replace替换VBox内容。
2026-06-01 13:35:51 +08:00
dc007a30a9 feat: 模型广场页面 - 新增 model_plaza.ui (TabPanel按分类/按供应商) - 新增 model_plaza.css (卡片悬浮效果/间距优化) - show_llms/show_llms_by_providers 添加 plaza-card/plaza-grid CSS - load_path.py 注册权限 2026-05-31 11:08:10 +08:00