text
stringlengths
14
100k
source
stringclasses
1 value
repo
stringclasses
810 values
language
stringclasses
13 values
<|fim_suffix|>lizers.formats + RouteNodeIdsSerializer case ShortChannelIdRouteFormat => JsonSerializers.formats + RouteShortChannelIdsSerializer case FullRouteFormat => JsonSerializers.formats + RouteFullSerializer } HttpResponse(OK).withEntity(ContentTypes.`application/json`, serialization.write(ro...
fim
ACINQ/eclair
scala
/* * Copyright 2019 ACINQ SAS * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in...
fim
ACINQ/eclair
scala
/* * Copyright 2019 ACINQ SAS * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in...
fim
ACINQ/eclair
scala
/* * Copyright 2024 ACINQ SAS * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in...
fim
ACINQ/eclair
scala
<|fim_prefix|>/* * Copyright 2019 ACINQ SAS * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License a<|fim_suffix|>) } else { complete(eclairApi.updateRelayFee(nodes, feeBase, fee...
fim
ACINQ/eclair
scala
<|fim_prefix|>/* * Copyright 2019 ACINQ SAS * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law o...
fim
ACINQ/eclair
scala
<|fim_prefix|>/* * Copyright 2019 ACINQ SAS * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law o...
fim
ACINQ/eclair
scala
<|fim_prefix|>/* * Copyright 2019 ACINQ SAS * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law o...
fim
ACINQ/eclair
scala
<|fim_suffix|>mplete(eclairApi.createOffer(description_opt, amount_opt, expireInSeconds_opt, issuer_opt, blindedPathsFirstNodeId_opt)) } } val disableOffer: Route = postRequest("disableoffer") { implicit t => formFields(offerFormParam) { offer => complete(eclairApi.disableOffer(offer)) } } v...
fim
ACINQ/eclair
scala
<|fim_prefix|>/* * Copyright 2019 ACINQ SAS * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache<|fim_suffix|>etdescriptors } <|fim_middle|>.org/licenses/LICENSE-...
fim
ACINQ/eclair
scala
<|fim_prefix|>/* * Copyright 2019 ACINQ SAS * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law o...
fim
ACINQ/eclair
scala
<|fim_prefix|>/* * Copyright 2019 ACINQ SAS * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law o...
fim
ACINQ/eclair
scala
<|fim_suffix|>e(self, classOf[ChannelFundingCreated]) context.system.eventStream.subscribe(self, classOf[ChannelFundingConfirmed]) context.system.eventStream.subscribe(self, classOf[ChannelReadyForPayments]) context.system.eventStream.subscribe(self, classOf[ChannelStateChanged]) context...
fim
ACINQ/eclair
scala
<|fim_prefix|>/* * Copyright 2019 ACINQ SAS * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law o...
fim
ACINQ/eclair
scala
<|fim_suffix|>extends Json4sSupport { implicit val serialization: Serialization = JsonSerializers.serialization implicit val formats: Formats = JsonSerializers.formats } <|fim_prefix|>/* * Copyright 2019 ACINQ SAS * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file ex...
fim
ACINQ/eclair
scala
<|fim_suffix|>ny[Timeout]) returns Future.successful(UUID.randomUUID()) val mockService = new MockService(eclair) Post("/payinvoice", FormData("invoice" -> invoice, "amountMsat" -> "456", "maxFeeFlatSat" -> "10", "maxFeePct" -> "0.5", "pathFindingExperimentName" -> "my-test-experiment").toEntity) ~> addC...
fim
ACINQ/eclair
scala
const container = require('markdown-it-container'); const fs = require('fs'); module.exports = { title: 'AI Expert Roadmap', description: 'The i.am.ai Experts Roadmap', dest: 'public/roadmap', base: '/roadmap/', themeConfig: { repo: 'https://github.com/AMAI-GmbH/AI-Expert-Roadmap', d...
fim
AMAI-GmbH/AI-Expert-Roadmap
javascript
from packaging import version __version__ = "0.86.3.dev" safe_version = __version__ try: from aider._version import __version__ except Exception: __version__ = safe_version + "+import" if type(__version__) is not str: __version__ = safe_version + "+type" else: try: if version.parse(__version_...
fim
Aider-AI/aider
python
<|fim_suffix|>"__main__": main() <|fim_prefix|>from .main import main if __name__ ==<|fim_middle|> <|endoftext|>
fim
Aider-AI/aider
python
<|fim_prefix|>import json import platform import sys import time import uuid from pathlib import Path from mixpanel import MixpanelException from posthog import Posthog from aider import __version__ from aider.dump import dump # noqa: F401 from aider.models import model_info_manager PERCENT = 10 def compute_hex_t...
fim
Aider-AI/aider
python
<|fim_suffix|>', '.join(shtab.SUPPORTED_SHELLS)}", file=sys.stderr) sys.exit(1) parser = get_parser([], None) parser.prog = "aider" # Set the program name on the parser print(shtab.complete(parser, shell=shell)) else: print("Error: Please specify ...
fim
Aider-AI/aider
python
import argparse from aider import urls from .dump import dump # noqa: F401 class DotEnvFormatter(argparse.HelpFormatter): def start_section(self, heading): res = "\n\n" res += "#" * (len(heading) + 3) res += f"\n# {heading}" super().start_section(res) def _format_usage(self...
fim
Aider-AI/aider
python
<|fim_suffix|>DiffSimpleCoder from .wholefile_coder import WholeFileCoder # from .single_wholefile_func_coder import SingleWholeFileFunctionCoder __all__ = [ HelpCoder, AskCoder, Coder, EditBlockCoder, EditBlockFencedCoder, WholeFileCoder, PatchCoder, UnifiedDiffCoder, UnifiedDiffS...
fim
Aider-AI/aider
python
<|fim_suffix|>st self.aider_commit_hashes = editor_coder.aider_commit_hashes <|fim_prefix|>from .architect_prompts import ArchitectPrompts from .ask_coder import AskCoder from .base_coder import Coder class ArchitectCoder(AskCoder): edit_format = "architect" gpt_prompts = ArchitectPrompts() auto_a...
fim
Aider-AI/aider
python
<|fim_suffix|> DO NOT show the entire updated function/file/etc! Always reply to the user in {language}. """ example_messages = [] files_content_prefix = """I have *added these files to the chat* so you see all of their contents. *Trust this message as the true contents of the files!* Other messages in the ...
fim
Aider-AI/aider
python
<|fim_prefix|>from .ask_prompts import As<|fim_suffix|>sk" gpt_prompts = AskPrompts() <|fim_middle|>kPrompts from .base_coder import Coder class AskCoder(Coder): """Ask questions about code without making any changes.""" edit_format = "a<|endoftext|>
fim
Aider-AI/aider
python
<|fim_suffix|>ribe the needed changes or give a plan. Providing code snippets or pseudo-code is fine, if it helps explain the plan or the needed changes. """ example_messages = [] files_content_prefix = """I have *added these files to the chat* so you see all of their contents. *Trust this message as the true...
fim
Aider-AI/aider
python
<|fim_prefix|>#!/usr/bin/env python import base64 import hashlib import json import locale import math import mimetypes import os import platform import re import sys import threading import time import traceback from collections import defaultdict from datetime import datetime # Optional dependency: used to convert ...
fim
Aider-AI/aider
python
<|fim_prefix|>class CoderPrompts: system_reminder = "" files_content_gpt_edits = "I committed the changes with git hash {hash} & commit msg: {message}" files_content_gpt_edits_no_repo = "I updated the files." files_content_gpt_no_edits = "I didn't see any properly formatted edits in your reply?!" ...
fim
Aider-AI/aider
python
<|fim_suffix|>ssages): if not messages: return content = messages[-1]["content"] if type(content) is str: content = dict( type="text", text=content, ) content["cache_control"] = {"type": "ephemeral"} messages[-...
fim
Aider-AI/aider
python
<|fim_prefix|>from .base_coder import Coder from .context_promp<|fim_suffix|>rent_rel_fnames) # dump(mentioned_rel_fnames) # dump(current_rel_fnames == mentioned_rel_fnames) if mentioned_rel_fnames == current_rel_fnames: return True if self.num_reflections >= self.max_refle...
fim
Aider-AI/aider
python
<|fim_suffix|>n = """I have updated the set of files added to the chat. Review them to decide if this is the correct set of files or if we need to add more or remove files. If this is the right set, just return the current list of files. Or return a smaller or larger set of files which need to be edited, with symbols ...
fim
Aider-AI/aider
python
<|fim_prefix|>import difflib import math import re import sys from difflib import SequenceMatcher from pathlib import Path from aider import utils from ..dump import dump # noqa: F401 from .base_coder import Coder from .editblock_prompts import EditBlockPrompts class EditBlockCoder(Coder): """A coder that uses...
fim
Aider-AI/aider
python
<|fim_suffix|>Coder): """A coder that uses fenced search/replace blocks for code modifications.""" edit_format = "diff-fenced" gpt_prompts = EditBlockFencedPrompts() <|fim_prefix|>from ..dump impor<|fim_middle|>t dump # noqa: F401 from .editblock_coder import EditBlockCoder from .editblock_fenced_prompts ...
fim
Aider-AI/aider
python
<|fim_suffix|>o escaping of characters, etc. 3. The start of search block: <<<<<<< SEARCH 4. A contiguous chunk of lines to search for in the existing source code 5. The dividing line: ======= 6. The lines to replace into the source code 7. The end of the replace block: >>>>>>> REPLACE 8. The closing fence: {fence[1]} ...
fim
Aider-AI/aider
python
<|fim_suffix|>h of file to edit", ), original_lines=dict( type="array", items=dict( type="string", ), ...
fim
Aider-AI/aider
python
<|fim_prefix|># flake8: noqa: E501 from .base_prompts import CoderPrompts class EditBlockFunctionPrompts(CoderPrompts): main_system = """Act as an expert software developer. Take requests for changes to the <|fim_suffix|>de the `replace_lines` function. """ files_content_prefix = "Here is the current conten...
fim
Aider-AI/aider
python
<|fim_prefix|># flake8: noqa: E501 from . import shell from .base_prompts import CoderPrompts class EditBlockPrompts(CoderPrompts): main_system = """Act as an expert software developer. Always use best practices when coding. Respect and use existing conventions, libraries, etc that are already present in the cod...
fim
Aider-AI/aider
python
<|fim_prefix|>from .editblock_fenced_coder import EditBlockFencedCoder from .editor_diff_fenced_prompts import EditorDiffFencedPrompts class EditorDiffFencedCoder(EditBlockFencedCoder): "A coder that us<|fim_suffix|> EditorDiffFencedPrompts() <|fim_middle|>es search/replace blocks, focused purely on editing files...
fim
Aider-AI/aider
python
<|fim_prefix|># flake8: noqa: E501 from .editblock_<|fim_suffix|>itBlockFencedPrompts): shell_cmd_prompt = "" no_shell_cmd_prompt = "" shell_cmd_reminder = "" go_ahead_tip = "" rename_with_shell = "" <|fim_middle|>fenced_prompts import EditBlockFencedPrompts class EditorDiffFencedPrompts(Ed<|endo...
fim
Aider-AI/aider
python
<|fim_prefix|>from .editblock_coder import EditBlockCoder from .editor_editblock_prompts import EditorEditBlockPrompts class EditorEdi<|fim_suffix|>diff" gpt_prompts = EditorEditBlockPrompts() <|fim_middle|>tBlockCoder(EditBlockCoder): "A coder that uses search/replace blocks, focused purely on editing files....
fim
Aider-AI/aider
python
<|fim_prefix|># flake8: noqa: E501 from .editblock_prompts import EditBlockPrompts class EditorEditBlockPrompts(EditBlockPrompts): main_system = """Act as an ex<|fim_suffix|>A *SEARCH/REPLACE BLOCK*! """ shell_cmd_prompt = "" no_shell_cmd_prompt = "" shell_cmd_reminder = "" go_ahead_tip = "" ...
fim
Aider-AI/aider
python
<|fim_suffix|>leFilePrompts() <|fim_prefix|>from .editor_whole_prompts import EditorWholeFilePrompts from .wholefile_coder import WholeFileCoder class EditorWholeFileCoder(WholeFileCoder): "A coder that operates on entire files, <|fim_middle|>focused purely on editing files." edit_format = "editor-whole" ...
fim
Aider-AI/aider
python
<|fim_prefix|># flake8: noqa: E501 from .wholefile_prompts import WholeFilePrompts class EditorWholeFilePrompts(WholeFileProm<|fim_suffix|> = """Act as an expert software developer and make changes to source code. {final_reminders} Output a copy of each file that needs changes. """ <|fim_middle|>pts): main_syste...
fim
Aider-AI/aider
python
<|fim_suffix|>f get_edits(self, mode="update"): return [] def apply_edits(self, edits): pass <|fim_prefix|>from ..dump import dump # noqa: F401 from .base_coder import Coder from .help_prompts import HelpPrompts class HelpCoder(Coder): """Interactive help and documentation about aider<|fim_m...
fim
Aider-AI/aider
python
# flake8: noqa: E501 from .base_prompts import CoderPrompts class HelpPrompts(CoderPrompts): main_system = """You are an expert on the AI coding tool called Aider. Answer the user's questions about how to use aider. The user is currently chatting with you using aider, to write and edit code. Use the provided a...
fim
Aider-AI/aider
python
<|fim_prefix|>import pathlib from dataclasses import dataclass, field from e<|fim_suffix|>ed line while parsing patch: {line}") # Check if we consumed the whole input or stopped early # Tolerate missing "*** End Patch" if we processed actions # if index < len(lines) and _norm(lines[index-1]) !=...
fim
Aider-AI/aider
python
<|fim_suffix|>hese lines MUST start with a single space ` `. 2. Lines to remove: Precede each line to be removed with a minus sign `-`. 3. Lines to add: Precede each line to be added with a plus sign `+`. 4. Context lines: Include 3 lines of context *after* the change. These lines MUST start with a single space ` `. C...
fim
Aider-AI/aider
python
<|fim_prefix|>#!/usr/bin/env python import sys from pathlib import Path try: import git except ImportError: git = None from diff_match_patch import diff_match_patch from tqdm import tqdm from aider.dump import dump from aider.utils import GitTemporaryDirectory class RelativeIndenter: """Rewrites text ...
fim
Aider-AI/aider
python
<|fim_prefix|>shell_cmd_prompt = """ 4. *Concisely*<|fim_suffix|>n it with the testing tool used by the project. - Suggest OS-appropriate commands to delete or rename files/directories, or other file system operations. - If your code changes add new dependencies, suggest the command to install them. - Etc. """ # noqa ...
fim
Aider-AI/aider
python
<|fim_suffix|>in edits: full_path = self.abs_root_path(path) self.io.write_text(full_path, content) <|fim_prefix|>from aider import diffs from ..dump import dump # noqa: F401 from .base_coder import Coder from .single_wholefile_func_prompts import SingleWholeFileFunctionPrompts class SingleW...
fim
Aider-AI/aider
python
<|fim_prefix|># flake8: noqa: E501 from .base_prompts import CoderPrompts class SingleWholeFileFunctionPrompts(CoderPrompts): main_system = """Act as an expert software developer. Take requests for changes to the supplied code. If the request is ambiguous, ask questions. Once you understand the request you MUST...
fim
Aider-AI/aider
python
<|fim_suffix|>ch_and_replace, all_preprocs), ] return flexible_search_and_replace(texts, strategies) def make_new_lines_explicit(content, hunk): before, after = hunk_to_before_after(hunk) diff = diff_lines(before, content) back_diff = [] for line in diff: if line[0] == "+": ...
fim
Aider-AI/aider
python
<|fim_suffix|>with a `@@ ... @@` line. Don't include line numbers like `diff -U0` does. The user's patch tool doesn't need them. The user's patch tool needs CORRECT patches that apply cleanly against the current contents of the file! Think carefully and make sure you include and mark all lines that need to be removed ...
fim
Aider-AI/aider
python
<|fim_prefix|>from .udiff_coder import UnifiedDiffCoder from .udiff_simple_prompts im<|fim_suffix|> avoiding line numbers. """ edit_format = "udiff-simple" gpt_prompts = UnifiedDiffSimplePrompts() <|fim_middle|>port UnifiedDiffSimplePrompts class UnifiedDiffSimpleCoder(UnifiedDiffCoder): """ A c...
fim
Aider-AI/aider
python
<|fim_suffix|> patch tool needs CORRECT patches that apply cleanly against the current contents of the file! Think carefully and make sure you include and mark all lines that need to be removed or changed as `-` lines. Make sure you mark all new or modified lines with `+`. Don't leave out any lines or the diff patch wo...
fim
Aider-AI/aider
python
<|fim_suffix|> output.append(line) if mode == "diff": if fname is not None: # ending an existing block full_path = (Path(self.root) / fname).absolute() output += self.do_live_diff(full_path, new_lines, False) return "\n".join(output) ...
fim
Aider-AI/aider
python
<|fim_prefix|>from aider import diffs from ..dump import dump # noqa: F401 from .base_coder import Coder from .wholefile_func_prompts import WholeFileFunctionPrompts class WholeFileFunctionCoder(Coder): functions = [ dic<|fim_suffix|>="write_file", description="create or update one or more f...
fim
Aider-AI/aider
python
<|fim_prefix|># flake8: noqa: E501 from .base_prompts import CoderPrompts class WholeFileFunctionPrompts(CoderPrompts): main_system = """Act as an expert software developer. Take requests for changes to the supplied code. If the request is ambiguous, ask questions. Once you understand the request you MUST use t...
fim
Aider-AI/aider
python
<|fim_prefix|># flake8: noqa: E501 from .base_prompts import CoderPrompts class WholeFilePrompts(CoderPrompts): main_system = """Act as an expert software developer. Take requests for changes to the supplied code. If the request is ambiguous, ask questions. {final_reminders} Once you understand the request you M...
fim
Aider-AI/aider
python
<|fim_suffix|> restored = set() unrestored = set() for file_path in changed_files_last_commit: try: self.coder.repo.repo.git.checkout("HEAD~1", file_path) restored.add(file_path) except ANY_GIT_ERROR: unrestored.add(file_path) ...
fim
Aider-AI/aider
python
<|fim_prefix|>import threading import time import pyperclip class ClipboardWatcher: """Watches clipboard for changes and updates IO placeholder""" def __init__(self, io, verbose=False): self.io = io self.verbose = verbose self.stop_event = None self.watcher_thread = None ...
fim
Aider-AI/aider
python
<|fim_suffix|>is model for alias, full_name in MODEL_ALIASES.items(): if full_name == model_name: display_name = alias break # Show the warning io.tool_warning( f"The --{arg_name.replace('_', '-')} flag is depre...
fim
Aider-AI/aider
python
<|fim_suffix|>es_orig, lines_updated, final=False, fname=None): """ Given only the first part of an updated file, show the diff while ignoring the block of "deleted" lines that are past the end of the partially complete update. """ # dump(lines_orig) # dump(lines_updated) assert_newlin...
fim
Aider-AI/aider
python
import json import traceback def cvt(s): if isinstance(s, str): return s try: return json.dumps(s, indent=4) except TypeError: return str(s) def dump(*vals): # http://docs.python.org/library/traceback.html stack = traceback.extract_stack() vars = stack[-2][3] # s...
fim
Aider-AI/aider
python
<|fim_prefix|>""" Editor module for handling system text editor interactions. This module provides functionality to: - Discover and launch the system's configured text editor - Create and manage temporary files for editing - Handle editor preferences from environment variables - Support cross-platform editor operation...
fim
Aider-AI/aider
python
<|fim_suffix|>not able to authenticate you. Check your API key.", ), ExInfo("AzureOpenAIError", True, None), ExInfo("BadGatewayError", True, "The API provider's servers are down or overloaded."), ExInfo("BadRequestError", False, None), ExInfo("BudgetExceededError", True, None), ExInfo( "...
fim
Aider-AI/aider
python
def scrub_sensitive_info(args, text): # Replace sensitive information with last 4 characters if text and args.openai_api_key: last_4 = args.openai_api_key[-4:] text = text.replace(args.openai_api_key, f"...{last_4}") if text and args.anthropic_api_key: last_4 = args.anthropic_api_key...
fim
Aider-AI/aider
python
<|fim_prefix|>#!/usr/bin/env python import os import random import sys import streamlit as st from aider import urls from aider.coders import Coder from aider.dump import dump # noqa: F401 from aider.io import InputOutput from aider.main import main as cli_main from aider.scrape import Scraper, has_playwright cla...
fim
Aider-AI/aider
python
<|fim_suffix|>mp import dump # noqa: F401 from aider.help_pats import exclude_website_pats warnings.simplefilter("ignore", category=FutureWarning) def install_help_extra(io): pip_install_cmd = [ "aider-chat[help]", "--extra-index-url", "https://download.pytorch.org/whl/cpu", ] re...
fim
Aider-AI/aider
python
<|fim_prefix|># This needs to sync<|fim_suffix|>, ".jekyll-metadata", "Gemfile.lock", "Gemfile", "_config.yml", "**/OLD/**", "OLD/**", ] <|fim_middle|> with MANIFEST.in exclude_website_pats = [ "**/.DS_Store", "examples/**", "_posts/**", "HISTORY.md", "docs/benchmarks*md", ...
fim
Aider-AI/aider
python
<|fim_suffix|>= summarizer.summarize_chat_history_markdown(text) dump(summary) if __name__ == "__main__": main() <|fim_prefix|>import argparse from aider import models, prompts from aider.dump import dump # noqa: F401 class ChatSummary: def __init__(self, models=None, max_tokens=1024): if not ...
fim
Aider-AI/aider
python
<|fim_suffix|>prefix self.prompt_prefix = prompt_prefix inp = "" multiline_input = False style = self._get_style() completer_instance = ThreadedCompleter( AutoCompleter( root, rel_fnames, addable_rel_fnames, ...
fim
Aider-AI/aider
python
<|fim_prefix|>import os import re import subprocess import sys import traceback import warnings from dataclasses import dataclass from pathlib import Path import oslex from grep_ast import TreeContext, filename_to_lang from grep_ast.tsl import get_parser # noqa: E402 from aider.dump import dump # noqa: F401 from ai...
fim
Aider-AI/aider
python
import importlib import os import warnings from aider.dump import dump # noqa: F401 warnings.filterwarnings("ignore", category=UserWarning, module="pydantic") AIDER_SITE_URL = "https://aider.chat" AIDER_APP_NAME = "Aider" os.environ["OR_SITE_URL"] = AIDER_SITE_URL os.environ["OR_APP_NAME"] = AIDER_APP_NAME os.envi...
fim
Aider-AI/aider
python
<|fim_prefix|>import json import os import re import sys import threading import traceback import webbrowser from dataclasses import fields from pathlib import Path try: import git except ImportError: git = None import importlib_resources import shtab from dotenv import load_dotenv from prompt_toolkit.enums i...
fim
Aider-AI/aider
python
<|fim_prefix|>#!/usr/bin/env python import io import time from rich import box from rich.console import Console from rich.live import Live from rich.markdown import CodeBlock, Heading, Markdown from rich.panel import Panel from rich.syntax import Syntax from rich.text import Text from aider.dump import dump # noqa:...
fim
Aider-AI/aider
python
import difflib import hashlib import importlib.resources import json import math import os import platform import sys import time from dataclasses import dataclass, fields from datetime import datetime from pathlib import Path from typing import Optional, Union import json5 import yaml from PIL import Image from aide...
fim
Aider-AI/aider
python
<|fim_suffix|> io.tool_error("Could not find an available port between 8484 and 8584.") io.tool_error("Please ensure a port in this range is free, or configure manually.") return None callback_url = f"http://localhost:{port}/callback/aider" auth_code = None server_error = None server...
fim
Aider-AI/aider
python
<|fim_suffix|>}") except OSError: pass <|fim_prefix|>""" OpenRouter model metadata caching and lookup. This module keeps a local cached copy of the OpenRouter model list (downloaded from ``https://openrouter.ai/api/v1/models``) and exposes a helper class that returns metadata for a given mo...
fim
Aider-AI/aider
python
<|fim_suffix|>ISTORY summarize = """*Briefly* summarize this partial conversation about programming. Include less detail about older parts and more detail about the most recent messages. Start a new paragraph every time the topic changes! This is only part of a longer conversation so *DO NOT* conclude the summary with...
fim
Aider-AI/aider
python
#!/usr/bin/env python import re from aider.dump import dump # noqa # Standard tag identifier REASONING_TAG = "thinking-content-" + "7bbeb8e1441453ad999a0bbba8a46d4b" # Output formatting REASONING_START = "--------------\n► **THINKING**" REASONING_END = "------------\n► **ANSWER**" def remove_reasoning_content(res...
fim
Aider-AI/aider
python
<|fim_suffix|>.name") original_committer_name_env = os.environ.get("GIT_COMMITTER_NAME") original_author_name_env = os.environ.get("GIT_AUTHOR_NAME") committer_name = f"{original_user_name} (aider)" try: # Use context managers to handle environment variables with...
fim
Aider-AI/aider
python
<|fim_suffix|>f.map_cache[cache_key] = result self.last_map = result return result def get_ranked_tags_map_uncached( self, chat_fnames, other_fnames=None, max_map_tokens=None, mentioned_fnames=None, mentioned_idents=None, ): if not other_...
fim
Aider-AI/aider
python
<|fim_suffix|>s.excepthook = None # Check if VERSION_CHECK_FNAME exists and delete it if so try: if VERSION_CHECK_FNAME.exists(): VERSION_CHECK_FNAME.unlink() except Exception: pass # Swallow any errors # Format the traceback tb_lines = traceback.format_exception(exc_t...
fim
Aider-AI/aider
python
<|fim_prefix|># This ens<|fim_suffix|>o other files in this # dir. <|fim_middle|>ures that importlib_resources.files("aider.resources") # doesn't raise ImportError, even if there are n<|endoftext|>
fim
Aider-AI/aider
python
<|fim_prefix|>import os import platform import subprocess import sys from io import BytesIO import pexpect import psutil def run_cmd(command, verbose=False, error_print=None, cwd=None): try: if sys.stdin.isatty() and hasattr(pexpect, "spawn") and platform.system() != "Windows": retu<|fim_suff...
fim
Aider-AI/aider
python
<|fim_suffix|>str(e)}") return None, None try: content = page.content() mime_type = None if response: content_type = response.header_value("content-type") if content_type: ...
fim
Aider-AI/aider
python
<|fim_suffix|>messages(messages) raise ValueError("Messages don't properly alternate user/assistant:\n\n" + turns) last_role = role last_non_system_role = role # Ensure last non-system message is from user return last_non_system_role == "user" def ensure_alternating_roles(message...
fim
Aider-AI/aider
python
<|fim_suffix|> Check for GitHub Actions workflow files if dir_name == os.path.normpath(".github/workflows") and file_name.endswith(".yml"): return True return normalized_path in NORMALIZED_ROOT_IMPORTANT_FILES def filter_important_files(file_paths): """ Filter a list of file paths to return o...
fim
Aider-AI/aider
python
<|fim_prefix|>website = "https://aider.chat/" add_all_files = "https://aider.chat/docs/faq.html#how-can-i-add-all-the-files-to-the-chat" edit_errors = "https://aider.chat/docs/troubleshooting/edit-errors.html" git = "https://aider.chat/docs/git.html" enable_playwright = "https://aider.chat/docs/install/optional.html#en...
fim
Aider-AI/aider
python
<|fim_prefix|>import os import platform import subprocess import sys import tempfile from pathlib import Path import oslex from aider.dump import dump # noqa: F401 from aider.waiting import Spinner IMAGE_EXTENSIONS = {".png", ".jpg", ".jpeg", ".gif", ".bmp", ".tiff", ".webp", ".pdf"} class IgnorantTemporaryDirect...
fim
Aider-AI/aider
python
import os import sys import time from pathlib import Path import packaging.version import aider from aider import utils from aider.dump import dump # noqa: F401 VERSION_CHECK_FNAME = Path.home() / ".aider" / "caches" / "versioncheck" def install_from_main_branch(io): """ Install the latest version of aide...
fim
Aider-AI/aider
python
<|fim_prefix|>import math import os import queue import tempfile import time import warnings from prompt_toolkit.shortcuts import prompt from aider.llm import litellm from .dump import dump # noqa: F401 warnings.filterwarnings( "ignore", message="Couldn't find ffmpeg or avconv - defaulting to ffmpeg, but may n...
fim
Aider-AI/aider
python
<|fim_prefix|>#!/usr/bin/env python """ Thread-based, killable spinner utility. Use it like: from aider.waiting import WaitingSpinner spinner = WaitingSpinner("Waiting for LLM") spinner.start() ... # long task spinner.stop() """ import sys import threading import time from rich.console import...
fim
Aider-AI/aider
python
<|fim_prefix|>import re import threading from pathlib import Path from typing import Optional from grep_ast import TreeContext from pathspec import PathSpec from pathspec.patterns import GitWildMatchPattern from watchfiles import watch from aider.dump import dump # noqa from aider.watch_prompts import watch_ask_prom...
fim
Aider-AI/aider
python
<|fim_suffix|>u, and follow their instructions. After completing those instructions, also be sure to remove all the "AI" comments from the code too. """ watch_ask_prompt = """/ask Find the "AI" comments below (marked with █) in the code files I've shared with you. They contain my questions that I need you to answer a...
fim
Aider-AI/aider
python
<|fim_suffix|> text: 'Coding skill by model and code wrapping strategy', font: { size: 16 } }, legend: { position: 'top', }, tooltip: { callba...
fim
Aider-AI/aider
javascript
<|fim_prefix|><style> .chart-container { position: relative; width: 100%; max-width: 800px; margin: 0 auto; } </style> <div class="chart-container"> <canvas id="syntaxErrorsChart"></canvas> </div> <script src="https://cdn.jsdelivr.net/npm/chart.js"></script> <script> docume...
fim
Aider-AI/aider
javascript
<|fim_prefix|>document.addEventListener('DOMContentLoaded', function () { var ctx = document.getElementById('editChart').getContext('2d'); const blueDiagonalPattern = pattern.draw('diagonal', 'rgba(54, 162, 235, 0.2)'); const redDiagonalPattern = pattern.draw('diagonal', 'rgba(255, 99, 132, 0.2)'); let displaye...
fim
Aider-AI/aider
javascript