text stringlengths 7 1.68M | id stringlengths 17 99 | metadata dict | __index_level_0__ int64 0 33 |
|---|---|---|---|
{
"sha": "779e4edd862c259c4f292739eeb3671a19c44e9330837bcfba6e509521e0acbe",
"command_python": "/Users/admin/.chat/mamba/envs/code_interpreter/bin/python"
} | LabWorkflows/code_interpreter/runtime.json/0 | {
"file_path": "LabWorkflows/code_interpreter/runtime.json",
"repo_id": "LabWorkflows",
"token_count": 82
} | 0 |
import sys
import os
# Reuse the paths and imports from the context
home = os.path.expanduser("~")
org_libs_path = os.path.join(home, ".chat", "workflows", "org", "libs")
sys_libs_path = os.path.join(home, ".chat", "workflows", "sys", "libs")
sys.path.append(org_libs_path)
sys.path.append(sys_libs_path)
sys.path.appen... | LabWorkflows/git/update_issue_tasks/command.py/0 | {
"file_path": "LabWorkflows/git/update_issue_tasks/command.py",
"repo_id": "LabWorkflows",
"token_count": 1246
} | 1 |
description: "demo for chat confirm"
steps:
- run: $devchat_python $command_path/command.py | LabWorkflows/llm_demo/chat_with_confirm/command.yml/0 | {
"file_path": "LabWorkflows/llm_demo/chat_with_confirm/command.yml",
"repo_id": "LabWorkflows",
"token_count": 30
} | 2 |
import os
import sys
import json
from typing import Optional
from pr_agent.git_providers.git_provider import GitProvider, IncrementalPR
from pr_agent.git_providers.github_provider import GithubProvider
import pr_agent.git_providers as git_providers
from devchat.chatmark import Form, TextEditor, Button
class DevChatP... | LabWorkflows/pr/providers/devchat_provider.py/0 | {
"file_path": "LabWorkflows/pr/providers/devchat_provider.py",
"repo_id": "LabWorkflows",
"token_count": 3744
} | 3 |
import subprocess
import sys
import time
import requests
import json
import os
home = os.path.expanduser("~")
org_libs_path = os.path.join(home, ".chat", "workflows", "org", "libs")
sys_libs_path = os.path.join(home, ".chat", "workflows", "sys", "libs")
sys.path.append(org_libs_path)
sys.path.append(sys_libs_path)
... | LabWorkflows/use_code/command.py/0 | {
"file_path": "LabWorkflows/use_code/command.py",
"repo_id": "LabWorkflows",
"token_count": 747
} | 4 |
description: list workflows.
input: optional
steps:
- run: $devchat_python $command_path/command.py | LabWorkflows/workflow/list/command.yml/0 | {
"file_path": "LabWorkflows/workflow/list/command.yml",
"repo_id": "LabWorkflows",
"token_count": 31
} | 5 |
<component name="ProjectCodeStyleConfiguration">
<state>
<option name="USE_PER_PROJECT_SETTINGS" value="true" />
</state>
</component> | devchat-intellij/.idea/codeStyles/codeStyleConfig.xml/0 | {
"file_path": "devchat-intellij/.idea/codeStyles/codeStyleConfig.xml",
"repo_id": "devchat-intellij",
"token_count": 47
} | 6 |
## Get Setting
### JS to Java
```json
{
"action": "getSetting/request",
"metadata": {
"callback": "responseFunctionName"
},
"payload": null
}
```
### Java to JS
- success
```json
{
"action": "getSetting/response",
"metadata": {
"status": "success",
"error": ""
},
"payload": {
"setti... | devchat-intellij/api/setting.md/0 | {
"file_path": "devchat-intellij/api/setting.md",
"repo_id": "devchat-intellij",
"token_count": 565
} | 7 |
package ai.devchat.core
import ai.devchat.core.handlers.*
import com.alibaba.fastjson.JSONObject
import kotlin.reflect.KClass
import kotlin.reflect.full.primaryConstructor
class ActionHandlerFactory {
private val actionHandlerMap: Map<String, KClass<out ActionHandler>> = mapOf(
DevChatActions.SEND_MESSAGE... | devchat-intellij/src/main/kotlin/ai/devchat/core/ActionHandlerFactory.kt/0 | {
"file_path": "devchat-intellij/src/main/kotlin/ai/devchat/core/ActionHandlerFactory.kt",
"repo_id": "devchat-intellij",
"token_count": 1027
} | 8 |
package ai.devchat.core.handlers
import ai.devchat.core.BaseActionHandler
import ai.devchat.core.DevChatActions
import ai.devchat.storage.CONFIG
import com.alibaba.fastjson.JSONObject
class ListModelsRequestHandler(requestAction: String, metadata: JSONObject?, payload: JSONObject?) : BaseActionHandler(
requestAct... | devchat-intellij/src/main/kotlin/ai/devchat/core/handlers/ListModelsRequestHandler.kt/0 | {
"file_path": "devchat-intellij/src/main/kotlin/ai/devchat/core/handlers/ListModelsRequestHandler.kt",
"repo_id": "devchat-intellij",
"token_count": 199
} | 9 |
package ai.devchat.installer
import ai.devchat.common.Log
import ai.devchat.common.OSInfo
import java.io.File
import java.io.IOException
import java.nio.file.Paths
/**
* DevChat represents for the DevChat Python CLI
*/
class PythonEnvManager(private val workDir: String) {
private val mambaWorkDir = Paths.get(w... | devchat-intellij/src/main/kotlin/ai/devchat/installer/PythonEnvManager.kt/0 | {
"file_path": "devchat-intellij/src/main/kotlin/ai/devchat/installer/PythonEnvManager.kt",
"repo_id": "devchat-intellij",
"token_count": 2797
} | 10 |
package ai.devchat.plugin.hints
import ai.devchat.common.DevChatBundle
import ai.devchat.storage.CONFIG
import com.alibaba.fastjson.JSONObject
import com.intellij.openapi.editor.Editor
import com.intellij.psi.*
import com.intellij.refactoring.suggested.endOffset
import com.intellij.refactoring.suggested.startOffset
im... | devchat-intellij/src/main/kotlin/ai/devchat/plugin/hints/ExplainCodeCVProvider.kt/0 | {
"file_path": "devchat-intellij/src/main/kotlin/ai/devchat/plugin/hints/ExplainCodeCVProvider.kt",
"repo_id": "devchat-intellij",
"token_count": 507
} | 11 |
version: 2.1
executors:
node-executor:
docker:
- image: cimg/node:20.2.0
jobs:
build:
executor: node-executor
steps:
- checkout
- run: git submodule sync
- run: git submodule update --init
- run: npm install
- run: npm run build
- persist_to_workspace:
... | devchat-vscode/.circleci/config.yml/0 | {
"file_path": "devchat-vscode/.circleci/config.yml",
"repo_id": "devchat-vscode",
"token_count": 1201
} | 12 |
// A launch configuration that compiles the extension and then opens it inside a new window
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
{
"version": "0.2.0",
"configurations... | devchat-vscode/.vscode/launch.json/0 | {
"file_path": "devchat-vscode/.vscode/launch.json",
"repo_id": "devchat-vscode",
"token_count": 404
} | 13 |
{
"name": "devchat",
"displayName": "DevChat",
"description": "Write prompts, not code",
"version": "0.1.74",
"icon": "assets/devchat.png",
"publisher": "merico",
"engines": {
"vscode": "^1.75.0"
},
"repository": {
"type": "git",
"url": "https://github.com/devchat-ai/devchat-vscode.git"
... | devchat-vscode/package.json/0 | {
"file_path": "devchat-vscode/package.json",
"repo_id": "devchat-vscode",
"token_count": 17303
} | 14 |
/*
针对代码补全功能,构建prompt
prompt的好坏,取决于提供的上下文信息。
通过AST获取相对完整的信息,可能会增加提示的准确度,但也会增加代码提示的复杂度。
*/
import { logger } from "../../../util/logger";
import * as vscode from "vscode";
import { getAst, getTreePathAtCursor, RangeInFileWithContents } from "./ast";
import Parser from "web-tree-sitter";
import { getCommentPrefix, g... | devchat-vscode/src/contributes/codecomplete/ast/findIdentifiers.ts/0 | {
"file_path": "devchat-vscode/src/contributes/codecomplete/ast/findIdentifiers.ts",
"repo_id": "devchat-vscode",
"token_count": 1667
} | 15 |
// import { IDE, RangeInFile } from "core";
import { getAst, getTreePathAtCursor, RangeInFileWithContents } from "./ast/ast";
import { AutocompleteSnippet } from "./ranking";
import * as vscode from "vscode";
import Parser from "web-tree-sitter";
import { RangeInFile, readRangeInFile } from "./utils";
type GotoProvide... | devchat-vscode/src/contributes/codecomplete/lsp.ts/0 | {
"file_path": "devchat-vscode/src/contributes/codecomplete/lsp.ts",
"repo_id": "devchat-vscode",
"token_count": 2282
} | 16 |
import { UiUtilWrapper } from '../util/uiUtil';
import { MessageHandler } from './messageHandler';
import { isSending } from './sendMessage';
export async function chatWithDevChat(panel, message: string) {
if (isSending()) {
// already sending, show error
UiUtilWrapper.showErrorMessage("DevChat: A command is alr... | devchat-vscode/src/handler/chatHandler.ts/0 | {
"file_path": "devchat-vscode/src/handler/chatHandler.ts",
"repo_id": "devchat-vscode",
"token_count": 143
} | 17 |
import * as vscode from 'vscode';
import { MessageHandler } from './messageHandler';
import { regInMessage, regOutMessage } from '../util/reg_messages';
import {
stopDevChatBase,
sendMessageBase,
deleteChatMessageBase,
sendTextToDevChat
} from './sendMessageBase';
import { UiUtilWrapper } from '../util/ui... | devchat-vscode/src/handler/sendMessage.ts/0 | {
"file_path": "devchat-vscode/src/handler/sendMessage.ts",
"repo_id": "devchat-vscode",
"token_count": 1726
} | 18 |
import * as vscode from "vscode";
import * as path from "path";
// TODO: merge with find-defs.ts
interface Reference {
name: string;
abspath: string;
line: number; // 1-based
character: number; // 1-based
}
/**
* @param abspath: absolute path of the file
* @param line: line number, 1-based
* @para... | devchat-vscode/src/ide_services/endpoints/legacy_bridge/feature/find-refs.ts/0 | {
"file_path": "devchat-vscode/src/ide_services/endpoints/legacy_bridge/feature/find-refs.ts",
"repo_id": "devchat-vscode",
"token_count": 686
} | 19 |
/*
Util for askCode
*/
import * as fs from 'fs';
import * as path from 'path';
import { UiUtilWrapper } from './uiUtil';
let indexingStatus = 'stopped'; // 'started' | 'indexing' | 'stopped'
export function updateLastModifyTime() {
const workspaceFolder = UiUtilWrapper.workspaceFoldersFirstPath();
if (!workspaceFo... | devchat-vscode/src/util/askCodeUtil.ts/0 | {
"file_path": "devchat-vscode/src/util/askCodeUtil.ts",
"repo_id": "devchat-vscode",
"token_count": 674
} | 20 |
/*
Install DevChat with python=3.11.4
*/
import { logger } from "../logger";
import { appInstall, createEnvByConda, createEnvByMamba } from "./app_install";
import * as os from 'os';
import * as path from 'path';
import * as fs from 'fs';
import { UiUtilWrapper } from "../uiUtil";
import { DevChatConfig } from "../... | devchat-vscode/src/util/python_installer/install_devchat.ts/0 | {
"file_path": "devchat-vscode/src/util/python_installer/install_devchat.ts",
"repo_id": "devchat-vscode",
"token_count": 1015
} | 21 |
import { expect } from 'chai';
import { describe, it, beforeEach, afterEach } from 'mocha';
import fs from 'fs';
import yaml from 'yaml';
import { DevChatConfig } from '../../src/util/config'; // 调整路径以指向config.ts的实际位置
import sinon from 'sinon';
import { logger } from '../../src/util/logger'; // 调整路径以指向logger的实际位置
desc... | devchat-vscode/test/util/config.test.ts/0 | {
"file_path": "devchat-vscode/test/util/config.test.ts",
"repo_id": "devchat-vscode",
"token_count": 817
} | 22 |
<div align="center">

# DevChat: Intelligent Scripts that Streamline Your Dev Workflows
[](http://makeapullrequest.com)
[![Circ... | devchat/README.md/0 | {
"file_path": "devchat/README.md",
"repo_id": "devchat",
"token_count": 1767
} | 23 |
from typing import List, Optional, Dict, Any
from pydantic import BaseModel, Field
class AnthropicChatParameters(BaseModel, extra='ignore'):
max_tokens_to_sample: int = Field(1024, ge=1)
stop_sequences: Optional[List[str]]
temperature: Optional[float] = Field(0.2, ge=0, le=1)
top_p: Optional[float]
... | devchat/devchat/anthropic/anthropic_chat.py/0 | {
"file_path": "devchat/devchat/anthropic/anthropic_chat.py",
"repo_id": "devchat",
"token_count": 156
} | 24 |
import os
from typing import List, Optional
import re
class Namespace:
def __init__(self, root_path: str,
branches: List[str] = None):
"""
:param root_path: The root path of the namespace.
:param branches: The hidden branches with ascending order of priority.
"""
... | devchat/devchat/engine/namespace.py/0 | {
"file_path": "devchat/devchat/engine/namespace.py",
"repo_id": "devchat",
"token_count": 2290
} | 25 |
from .base import ChatMemory
from .fixsize_memory import FixSizeChatMemory
__all__ = [
"ChatMemory",
"FixSizeChatMemory",
]
| devchat/devchat/memory/__init__.py/0 | {
"file_path": "devchat/devchat/memory/__init__.py",
"repo_id": "devchat",
"token_count": 47
} | 26 |
import sys
from tinydb import TinyDB
def remove_topic_table(file_path: str):
try:
db = TinyDB(file_path)
if 'topics' in db.tables():
db.drop_table('topics')
print("The 'topics' table has been removed.")
else:
print("The file does not contain a 'topics' t... | devchat/scripts/purge_topics.py/0 | {
"file_path": "devchat/scripts/purge_topics.py",
"repo_id": "devchat",
"token_count": 273
} | 27 |
import os
import pytest
from devchat.engine import Namespace
def test_is_valid_name():
# Test valid names
assert Namespace.is_valid_name('') is True
assert Namespace.is_valid_name('a') is True
assert Namespace.is_valid_name('A.b') is True
assert Namespace.is_valid_name('a.2.c') is True
assert ... | devchat/tests/test_namespace.py/0 | {
"file_path": "devchat/tests/test_namespace.py",
"repo_id": "devchat",
"token_count": 2382
} | 28 |
description: Generate code with a Python-specific template embedded into the prompt. | workflows/code/py/command.yml/0 | {
"file_path": "workflows/code/py/command.yml",
"repo_id": "workflows",
"token_count": 16
} | 29 |
### 操作指南
生成函数注释,请按照如下步骤操作:
1. 选中函数代码。
2. 输入\/docstring,回车发送;或点击函数头部**docstring**按钮。
3. 开始生成函数注释,等待生成结束。
4. 自动弹出Diff View,选择是否接受修改。
如图所示:
 | workflows/docstring/README.md/0 | {
"file_path": "workflows/docstring/README.md",
"repo_id": "workflows",
"token_count": 240
} | 30 |
import os
import sys
import time
sys.path.append(os.path.join(os.path.dirname(__file__), "..", "libs"))
sys.path.append(os.path.join(os.path.dirname(__file__), "..", "..", "libs"))
from chatmark import Button, Checkbox, Form, Radio, Step, TextEditor # noqa: E402
def main():
print("\n\n---\n\n")
# Step
... | workflows/libs/chatmark/chatmark_example/main.py/0 | {
"file_path": "workflows/libs/chatmark/chatmark_example/main.py",
"repo_id": "workflows",
"token_count": 2002
} | 31 |
import json
from pathlib import Path
from typing import Callable, List
from assistants.directory_structure.base import DirectoryStructureBase
from assistants.rerank_files import rerank_files
from devchat.llm.openai import chat_completion_no_stream_return_json
from llm_conf import (
CONTEXT_SIZE,
DEFAULT_CONTEX... | workflows/unit_tests/assistants/directory_structure/relevant_file_finder.py/0 | {
"file_path": "workflows/unit_tests/assistants/directory_structure/relevant_file_finder.py",
"repo_id": "workflows",
"token_count": 2340
} | 32 |
import os
from typing import Optional
from openai import OpenAI, Stream
from openai.types.chat import ChatCompletionChunk
from tenacity import retry, stop_after_attempt, wait_random_exponential
# TODO: make this file a common module
def create_chat_completion_chunks(
client: Optional[OpenAI] = None, **kwargs
) ... | workflows/unit_tests/openai_util.py/0 | {
"file_path": "workflows/unit_tests/openai_util.py",
"repo_id": "workflows",
"token_count": 594
} | 33 |
prompts:
[
'write python script: {{topic}}',
]
providers:
- id: "exec:python llm_openai.py"
- id: "exec:python llm_devchat.py"
tests:
- vars:
topic: write python http server
| LabWorkflows/git/commit/test/prompt/promptfooconfig.yaml/0 | {
"file_path": "LabWorkflows/git/commit/test/prompt/promptfooconfig.yaml",
"repo_id": "LabWorkflows",
"token_count": 84
} | 0 |
description: 'Create new PR.'
steps:
- run: $devchat_python $command_path/command.py | LabWorkflows/git/new_pr/command.yml/0 | {
"file_path": "LabWorkflows/git/new_pr/command.yml",
"repo_id": "LabWorkflows",
"token_count": 28
} | 1 |
import sys
import os
home = os.path.expanduser("~")
org_libs_path = os.path.join(home, ".chat", "workflows", "org", "libs")
sys_libs_path = os.path.join(home, ".chat", "workflows", "sys", "libs")
sys.path.append(org_libs_path)
sys.path.append(sys_libs_path)
from llm_api import (
chat,
llm_edit_confirm,
)
@l... | LabWorkflows/llm_demo/chat_with_confirm/command.py/0 | {
"file_path": "LabWorkflows/llm_demo/chat_with_confirm/command.py",
"repo_id": "LabWorkflows",
"token_count": 281
} | 2 |
"""
当前脚本用于实现 /workflow.local_install命令
具体步骤有:
-> step1: 选择需要安装的command, 候选列表来自于~/.chat/workflows/usr下子目录列表
-> step2: 安装依赖环境。调用IDE服务,安装依赖环境,输入参数为command_name, requirements.txt文件路径。返回值为安装后的python路径。
-> step3: 更新command列表。调用IDE服务,更新command列表
"""
import os
import sys
import requests
sys.path.append(os.path.join(os.path.e... | LabWorkflows/workflow/list/command.py/0 | {
"file_path": "LabWorkflows/workflow/list/command.py",
"repo_id": "LabWorkflows",
"token_count": 553
} | 3 |
<component name="ProjectCodeStyleConfiguration">
<code_scheme name="Project" version="173">
<JetCodeStyleSettings>
<option name="CODE_STYLE_DEFAULTS" value="KOTLIN_OFFICIAL" />
</JetCodeStyleSettings>
<codeStyleSettings language="kotlin">
<option name="CODE_STYLE_DEFAULTS" value="KOTLIN_OFFICI... | devchat-intellij/.idea/codeStyles/Project.xml/0 | {
"file_path": "devchat-intellij/.idea/codeStyles/Project.xml",
"repo_id": "devchat-intellij",
"token_count": 143
} | 4 |
## List models
### JS to Java
```json
{
"action": "listModels/request",
"metadata": {
"callback": "responseFunctionName"
},
"payload": null
}
```
### Java to JS
```json
{
"action": "listModels/response",
"metadata": {
"status": "success",
"error": ""
},
"payload": {
"models": [
... | devchat-intellij/api/model.md/0 | {
"file_path": "devchat-intellij/api/model.md",
"repo_id": "devchat-intellij",
"token_count": 171
} | 5 |
package ai.devchat.core
interface ActionHandler {
fun executeAction()
}
| devchat-intellij/src/main/kotlin/ai/devchat/core/ActionHandler.kt/0 | {
"file_path": "devchat-intellij/src/main/kotlin/ai/devchat/core/ActionHandler.kt",
"repo_id": "devchat-intellij",
"token_count": 25
} | 6 |
package ai.devchat.core.handlers
import ai.devchat.core.BaseActionHandler
import ai.devchat.core.DevChatActions
import com.alibaba.fastjson.JSONObject
class ListContextsRequestHandler(requestAction: String, metadata: JSONObject?, payload: JSONObject?) : BaseActionHandler(
requestAction,
metadata,
payload... | devchat-intellij/src/main/kotlin/ai/devchat/core/handlers/ListContextsRequestHandler.kt/0 | {
"file_path": "devchat-intellij/src/main/kotlin/ai/devchat/core/handlers/ListContextsRequestHandler.kt",
"repo_id": "devchat-intellij",
"token_count": 355
} | 7 |
package ai.devchat.installer
import ai.devchat.storage.DevChatConfig
import ai.devchat.core.DevChatWrapper
import ai.devchat.common.Log
import ai.devchat.common.OSInfo
import ai.devchat.common.PathUtils
import ai.devchat.common.Notifier
import ai.devchat.plugin.browser
import ai.devchat.storage.CONFIG
import ai.devcha... | devchat-intellij/src/main/kotlin/ai/devchat/installer/DevChatSetupThread.kt/0 | {
"file_path": "devchat-intellij/src/main/kotlin/ai/devchat/installer/DevChatSetupThread.kt",
"repo_id": "devchat-intellij",
"token_count": 2308
} | 8 |
package ai.devchat.plugin.hints
import ai.devchat.common.DevChatBundle
import com.intellij.codeInsight.codeVision.settings.CodeVisionGroupSettingProvider
class DocStringCVSettingsProvider : CodeVisionGroupSettingProvider {
override val groupId: String
get() = "docstring"
override val groupName: String
ge... | devchat-intellij/src/main/kotlin/ai/devchat/plugin/hints/DocStringCVSettingsProvider.kt/0 | {
"file_path": "devchat-intellij/src/main/kotlin/ai/devchat/plugin/hints/DocStringCVSettingsProvider.kt",
"repo_id": "devchat-intellij",
"token_count": 150
} | 9 |
setTimeout(function () {
console.log("wait...")
}, 2000);
function displayResponseFromJava(message) {
document.getElementById('response').innerHTML = JSON.stringify(message, null, 2);
}
document.getElementById('sendButton').addEventListener('click', function () {
var el = document.getElementById('textInpu... | devchat-intellij/src/main/resources/static/main.js/0 | {
"file_path": "devchat-intellij/src/main/resources/static/main.js",
"repo_id": "devchat-intellij",
"token_count": 141
} | 10 |
{
// See http://go.microsoft.com/fwlink/?LinkId=827846
// for the documentation about the extensions.json format
"recommendations": ["dbaeumer.vscode-eslint", "amodio.tsl-problem-matcher"]
}
| devchat-vscode/.vscode/extensions.json/0 | {
"file_path": "devchat-vscode/.vscode/extensions.json",
"repo_id": "devchat-vscode",
"token_count": 70
} | 11 |
/*
针对代码补全功能,构建prompt
prompt的好坏,取决于提供的上下文信息。
通过AST获取相对完整的信息,可能会增加提示的准确度,但也会增加代码提示的复杂度。
*/
import { logger } from "../../../util/logger";
import * as vscode from "vscode";
import { getAst, getTreePathAtCursor, RangeInFileWithContents } from "./ast";
import Parser from "web-tree-sitter";
import { getCommentPrefix, g... | devchat-vscode/src/contributes/codecomplete/ast/findFunctions.ts/0 | {
"file_path": "devchat-vscode/src/contributes/codecomplete/ast/findFunctions.ts",
"repo_id": "devchat-vscode",
"token_count": 1832
} | 12 |
// @ts-ignore
import llamaTokenizer from "llama-tokenizer-js";
//import { ChatMessage, MessageContent, MessagePart } from "..";
import { TOKEN_BUFFER_FOR_SAFETY } from "./constants";
export type ChatMessageRole = "user" | "assistant" | "system";
export interface MessagePart {
type: "text" | "imageUrl";
text?: st... | devchat-vscode/src/contributes/codecomplete/llm/countTokens.ts/0 | {
"file_path": "devchat-vscode/src/contributes/codecomplete/llm/countTokens.ts",
"repo_id": "devchat-vscode",
"token_count": 3309
} | 13 |
import * as vscode from "vscode";
import {
registerOpenChatPanelCommand,
registerAddContextCommand,
registerAskForCodeCommand,
registerAskForFileCommand,
regApplyDiffResultCommand,
registerStatusBarItemClickCommand,
regPythonPathCommand,
registerInstallCommandsCommand,
registerDevChatChat... | devchat-vscode/src/extension.ts/0 | {
"file_path": "devchat-vscode/src/extension.ts",
"repo_id": "devchat-vscode",
"token_count": 1967
} | 14 |
import * as vscode from 'vscode';
import { MessageHandler } from './messageHandler';
import { regInMessage, regOutMessage } from '../util/reg_messages';
import { ApiKeyManager } from '../util/apiKey';
import { UiUtilWrapper } from '../util/uiUtil';
regInMessage({command: 'regModelList'});
regOutMessage({command: 're... | devchat-vscode/src/handler/removehandler.ts/0 | {
"file_path": "devchat-vscode/src/handler/removehandler.ts",
"repo_id": "devchat-vscode",
"token_count": 704
} | 15 |
import * as vscode from "vscode";
interface Definition {
name: string;
abspath: string;
line: number; // 1-based
character: number; // 1-based
}
/**
* @param abspath: absolute path of the file
* @param line: line number, 1-based
* @param character: character number, 1-based
*
**/
async function f... | devchat-vscode/src/ide_services/endpoints/legacy_bridge/feature/find-defs.ts/0 | {
"file_path": "devchat-vscode/src/ide_services/endpoints/legacy_bridge/feature/find-defs.ts",
"repo_id": "devchat-vscode",
"token_count": 1677
} | 16 |
import { logger } from "./logger";
type Action = {
action: "delete" | "insert" | "modify";
content?: string;
// eslint-disable-next-line @typescript-eslint/naming-convention
insert_after?: string;
// eslint-disable-next-line @typescript-eslint/naming-convention
insert_before?: string;
// eslint-disable-next-li... | devchat-vscode/src/util/appyDiff.ts/0 | {
"file_path": "devchat-vscode/src/util/appyDiff.ts",
"repo_id": "devchat-vscode",
"token_count": 2218
} | 17 |
import * as fs from 'fs';
import * as https from 'https';
import * as os from 'os';
import * as path from 'path';
import { logger } from '../logger';
// download url to tmp directory
// return: local file path or empty string
export async function downloadFile(url: string): Promise<string> {
const os = process.platfo... | devchat-vscode/src/util/python_installer/https_download.ts/0 | {
"file_path": "devchat-vscode/src/util/python_installer/https_download.ts",
"repo_id": "devchat-vscode",
"token_count": 584
} | 18 |
// test/commonUtil.test.ts
import { expect } from 'chai';
import * as fs from 'fs';
import * as os from 'os';
import * as path from 'path';
import {
createTempSubdirectory,
CommandRun,
runCommandAndWriteOutput,
runCommandStringAndWriteOutput,
getLanguageIdByFileName,
} from '../../src/util/commonUtil';
import { U... | devchat-vscode/test/util/commonUtil.test.ts/0 | {
"file_path": "devchat-vscode/test/util/commonUtil.test.ts",
"repo_id": "devchat-vscode",
"token_count": 1577
} | 19 |
[flake8]
max-line-length = 100
ignore = E712,W503 | devchat/.flake8/0 | {
"file_path": "devchat/.flake8",
"repo_id": "devchat",
"token_count": 20
} | 20 |
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
... | devchat/LICENSE/0 | {
"file_path": "devchat/LICENSE",
"repo_id": "devchat",
"token_count": 3168
} | 21 |
from .anthropic_chat import AnthropicChatParameters
__all__ = [
'AnthropicChatParameters'
]
| devchat/devchat/anthropic/__init__.py/0 | {
"file_path": "devchat/devchat/anthropic/__init__.py",
"repo_id": "devchat",
"token_count": 32
} | 22 |
End of preview. Expand in Data Studio
README.md exists but content is empty.
- Downloads last month
- 2