Files
deepseek-harness/packages/client/ui-dingtalk

description, kind
description kind
The DingTalk plugin's page on the Plugins page: sign in, check, and sign out of DingTalk without starting a conversation. package-reference

@deepseek-ai/dsh-client-ui-dingtalk

English | 中文

Summary

This package is the browser row of the DingTalk plugin. While the plugin is on, its page on the Plugins page shows a DingTalk account section where the user signs in and out without starting a conversation. Every operation runs on the Host through the dingtalk Remote; the page shows its progress and result.

Table of Contents


Use this package

Install the DingTalk plugin bundle, which inserts this package as the ui-dingtalk row. Opening the plugin's page checks the account, and a tag beside the title reads Not connected, Connecting, Connected, Unconfirmed, or Not running. Switching the plugin on from the list while the account is not connected offers Connect DingTalk, which opens the plugin's page and starts the sign-in.

Section state Action
Checking connection None; while the Host downloads dws or its skills, the status reads Downloading dws and its skills
Not connected Connect DingTalk opens the DingTalk authorization page; the section notes that an organization administrator must turn on CLI access first
Waiting for authorization on the DingTalk page The browser that clicked opens the authorization page once; Open authorization page opens it again, and Cancel ends the sign-in
Connecting None; the Host checks that dws reports the account signed in
Connected Shows the signed-in user and organization; Sign out asks for confirmation, then signs out the current account
Signing out None
Cannot confirm sign-in right now Retry checks the account again; when the download of dws or its skills did not finish, the section says so and Retry downloads again
DingTalk component not running The Host's dingtalk row did not load; the section points to the component list for the reason, and Retry subscribes to the Host again

Leaving the page does not cancel a sign-in, which the Host owns. The authorization page opens from the user's own click, because browsers block a window that opens long after it. A failed sign-in, sign-out, or check shows a failure notice with the command and exit code; a failed sign-in also names CLI access as a cause to check. A failed page action shows a toast, and so does a finished sign-in or sign-out. The section notes that the account is shared with dws in the computer's terminal and that turning the plugin off does not sign it out, and the sign-out confirmation says that the terminal is signed out of the account too while other organizations' accounts stay signed in.


Understand the implementation

Implementation internals — click to expand

The Host half, src/index.ts, is an empty apply, present only so the package holds the Loader row the client module system serves the browser half for. The browser half, src/client/index.ts, mounts the dingtalk Remote itself with ctx.remote.$mount, because the shipped Remote assembly does not include on-demand packages, and withdraws its registrations before unmounting it.

src/client/connection.ts creates one CliAccountConnection from the CLI plugin page pieces per browser plugin over the dingtalk Remote, and derives the page state from the Host's view alone. That connection opens a link only for the operation this browser started, only once, and only over HTTPS. src/client/DingtalkConnection.tsx renders the shared section, sign-out confirmation, tag, activation prompt, and toast with the DingTalk actions; the Web shell supplies the shared library as a platform module, so this package's bundle does not include it. It registers plugins.bundle.config keyed by @deepseek-ai/dsh-dingtalk for the section, plugins.bundle.activation for the guidance, plugins.detail.badge for the tag, and a shell.overlay toast. The page's copy, including the keys the shared pieces read, lives in this package's dingtalk dictionary.


Further Exploration


Model Experience

None, as the package is a browser-side page that registers no model surface.

KV Cache effect

None; this package neither assembles nor sends a provider request.

Known Limitations and Deferred Work

  • The page checks the account each time it subscribes and has no periodic check, so a sign-in or sign-out in the user's terminal appears after the page reopens.

Dev Note

Working context for maintainers — click to expand

None.