Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@astii/monaco-chat

Package Overview
Dependencies
Maintainers
0
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@astii/monaco-chat

monaco-editor inline chat

  • 0.0.2
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
7
decreased by-90.41%
Maintainers
0
Weekly downloads
 
Created
Source

@astii/monaco-chat

NPM version NPM downloads

inline AI chat tool for monaco-editor. with tool can use any model which response based on SSE

shot

Install

$ npm install @astii/monaco-chat

Usage

import { registerChat } from '@astii/monaco-chat'

useEffect(() => {
  if (!monaco || !editor) return;
  const dispose = registerChat(monaco, editor, {
    language: "typescript",
    path: "index.ts", //unique label
    request: new Request("", {
      method: "POST",
      headers: {
        "x-dmo-provider": "",
        authorization: "Bearer ",
        "Content-Type": "application/json",
      },
      body: JSON.stringify({
        model: "",
        stream: true,
        temperature: 0.1,
      }),
    }),
    onAccept(code: string) {

    },
    onFree() {
      
    }
  });
  return () => {
    dispose();
  };
}, [monaco, editor]);

with the Request params, developer can request custom model service

LICENSE

MIT

Keywords

FAQs

Package last updated on 03 Jan 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc