fix(core): artifact rendering issue in standalone ai chat panel (#13166)

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **New Features**
* Improved chat component to support document link navigation directly
from chat messages, allowing users to open documents in the workbench
when links are clicked.

* **Refactor**
* Streamlined notification handling and property access in document
composition tools for a cleaner user experience.
* Updated import statements for improved code clarity and
maintainability.
  * Enhanced code artifact tool rendering to ensure consistent theming.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
Peng Xiao
2025-07-11 17:53:04 +08:00
committed by GitHub
parent 15726bd522
commit 9cda655c9e
5 changed files with 8 additions and 20 deletions
@@ -58,7 +58,9 @@ function useCopilotClient() {
function createMockStd(workspace: Workspace) {
workspace.meta.initialize();
const store = workspace.createDoc().getStore();
// just pick a random doc for now
const store = workspace.docs.values().next().value?.getStore();
if (!store) return null;
const std = new BlockStdScope({
store,
extensions: [...getViewManager().config.init().value.get('page')],
@@ -187,7 +189,7 @@ export const Component = () => {
content.session = currentSession;
content.workspaceId = workspaceId;
content.extensions = specs;
content.std = mockStd;
content.host = mockStd?.host;
content.docDisplayConfig = docDisplayConfig;
content.searchMenuConfig = searchMenuConfig;
content.networkSearchConfig = networkSearchConfig;