mirror of
https://github.com/OMGeeky/gpt-pilot.git
synced 2026-02-23 15:49:50 +01:00
where is update_file
This commit is contained in:
@@ -226,14 +226,20 @@ class Project:
|
||||
# TODO END
|
||||
|
||||
data['path'], data['full_path'] = self.get_full_file_path(data['path'], data['name'])
|
||||
update_file(data['full_path'], data['content'])
|
||||
|
||||
(File.insert(app=self.app, path=data['path'], name=data['name'], full_path=data['full_path'])
|
||||
.on_conflict(
|
||||
conflict_target=[File.app, File.name, File.path],
|
||||
preserve=[],
|
||||
update={ 'name': data['name'], 'path': data['path'], 'full_path': data['full_path'] })
|
||||
.execute())
|
||||
logger.info(f'-------------update_file: {update_file}')
|
||||
print('--------------------------------------')
|
||||
print(update_file)
|
||||
|
||||
|
||||
# update_file(data['full_path'], data['content'])
|
||||
#
|
||||
# (File.insert(app=self.app, path=data['path'], name=data['name'], full_path=data['full_path'])
|
||||
# .on_conflict(
|
||||
# conflict_target=[File.app, File.name, File.path],
|
||||
# preserve=[],
|
||||
# update={ 'name': data['name'], 'path': data['path'], 'full_path': data['full_path'] })
|
||||
# .execute())
|
||||
|
||||
def get_full_file_path(self, file_path: str, file_name: str) -> Tuple[str, str]:
|
||||
|
||||
|
||||
@@ -129,7 +129,7 @@ class TestDeveloper:
|
||||
|
||||
@patch('helpers.cli.execute_command', return_value=('stdout:\n```\n\n```', 'DONE'))
|
||||
@patch('helpers.AgentConvo.get_saved_development_step')
|
||||
@patch('helpers.AgentConvo.save_development_step', new_callable=MagicMock)
|
||||
@patch('helpers.AgentConvo.save_development_step')
|
||||
@patch('utils.llm_connection.requests.post')
|
||||
@patch('utils.questionary.get_saved_user_input')
|
||||
def test_test_code_changes_invalid_json(self, mock_get_saved_user_input,
|
||||
|
||||
Reference in New Issue
Block a user