What is ChatMark?
maindevchat repository provides a Python implementation for common ChatMark widgets.repository·main·Indexed 18 days ago
https://github.com/devchat-ai/devchatDevChat is an open-source AI-driven development tool (v0.3.0) that implements a 'Prompt-Centric Software Development' (PCSD) model. It allows developers to automate workflows using natural language, personalized AI agents, and knowledge engineering via integrated knowledge graphs. It is available as a Python library, a CLI, and as extensions for Visual Studio Code and the IntelliJ Platform. Key features include ChatMark for interactive chat widgets and a flexible configuration system for managing AI providers and models.
devchat repository provides a Python implementation for common ChatMark widgets.DevChat uses Knowledge Engineering to help AI understand your specific software development context and private domain knowledge. Key capabilities include:
DevChat uses integrated knowledge graph capabilities to help AI understand your private codebase and documentation. This is achieved through:
DevChat allows you to create custom AI workflows using natural language instead of rigid drag-and-drop interfaces. You can generate intelligent workflows by providing a few sentences of description.
Common use cases include:
The ecosystem includes a collection of plugins for IDE context and various autonomous agents.
To use the chatmark_example workflow, you must manually place the example folder into your DevChat workflow directory and define a command configuration. This allows you to trigger the example via the DevChat VS Code plugin.
chatmark_example folder to your local DevChat workflow directory at ~/.chat/workflow/org.command.yml file inside ~/.chat/workflow/org/chatmark_example/ with the following content to define how the workflow executes:description: chatmark examples
steps:
- run: $command_python $command_path/main.py/chatmark_example in the chat interface.DevChat provides several specialized features for developers:
DevChat is available as an extension for major IDEs. You can install it to direct AI to perform tasks using natural language without leaving your development environment.
Install the DevChat extension from the Visual Studio Marketplace.
Install the DevChat plugin from the JetBrains Marketplace.
The Prompt class is an abstract base class (ABC) used to represent a single round of conversation with an AI model. It encapsulates the model metadata, user information, the current request, the generated responses, and the conversation history.
Because it is an abstract class, you must implement a concrete subclass that defines how messages are formatted for specific APIs and how token counts are calculated.
Key responsibilities of a Prompt implementation include:
request and responses (as Message objects).new_context (contextual messages).prepend_history._count_response_tokens.hash for the prompt state using finalize_hash.DevChat is an open-source intelligent IDE plugin designed to bridge the gap between general AI capabilities and specific software development workflows. It focuses on two primary pillars:
To use Prompt in your own implementation, you must subclass it and implement the following abstract methods:
_count_response_tokens() -> int: Calculate the number of tokens used in the responses.messages() -> List[dict]: Return the list of messages formatted specifically for your target Chat API.input_messages(messages: List[dict]): Logic to ingest messages from an API into the prompt's internal new_messages and history_messages structures.append_new(message_type: str, content: str, available_tokens: int = sys.maxsize) -> bool: Append a user-provided message.prepend_history(prompt: "Prompt", token_limit: int = sys.maxsize) -> bool: Add a previous prompt to the history.set_request(content: str): Set the primary request content.set_response(response_str: str): Parse a JSON-formatted response string from an API.append_response(delta_str: str) -> str: Handle streaming responses by appending deltas and returning the extracted content.Use store_prompt(prompt) to persist a Prompt object. This method performs several operations:
_chat_lists). If the prompt has a parent, it is appended to the existing chat list; otherwise, a new chat list is started.topics table with metadata like user, date, request (truncated), and responses (truncated).Returns:
str: The hash of the root prompt for the current topic/chat list.topic_hash = store.store_prompt(prompt_object)